mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-16 15:36:36 +00:00
add first version using docusaurus-openapi-docs
This commit is contained in:
58
docs/api/create-a-group.api.mdx
Normal file
58
docs/api/create-a-group.api.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: create-a-group
|
||||
title: "Create a Group"
|
||||
description: "Creates a Group"
|
||||
sidebar_label: "Create a Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a Group","tags":["Groups"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"New Group request","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"peers":{"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"A Group Object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"},{"type":"object","properties":{"peers":{"description":"List of peers object","type":"array","items":{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"}}},"required":["peers"]}],"title":"Group"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/groups","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","peers":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Group","description":{"content":"Creates a Group","type":"text/plain"},"url":{"path":["api","groups"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Group
|
||||
|
||||
|
||||
|
||||
Creates a Group
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
New Group request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Group Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>peers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
List of peers object
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0,\n \"peers\": [\n {\n \"id\": \"string\",\n \"name\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/create-a-nameserver-group.api.mdx
Normal file
62
docs/api/create-a-nameserver-group.api.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
id: create-a-nameserver-group
|
||||
title: "Create a Nameserver Group"
|
||||
description: "Creates a Nameserver Group"
|
||||
sidebar_label: "Create a Nameserver Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a Nameserver Group","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"New Nameserver Groups request","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}}}},"responses":{"200":{"description":"A Nameserver Groups Object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Nameserver group ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}],"title":"NameserverGroup"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/dns/nameservers","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","description":"string","nameservers":[{"ip":"string","ns_type":"udp","port":0}],"enabled":true,"groups":["string"],"primary":true,"domains":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Nameserver Group","description":{"content":"Creates a Nameserver Group","type":"text/plain"},"url":{"path":["api","dns","nameservers"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Nameserver Group
|
||||
|
||||
|
||||
|
||||
Creates a Nameserver Group
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
New Nameserver Groups request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Nameserver Groups Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"nameservers\": [\n {\n \"ip\": \"string\",\n \"ns_type\": \"udp\",\n \"port\": 0\n }\n ],\n \"enabled\": true,\n \"groups\": [\n \"string\"\n ],\n \"primary\": true,\n \"domains\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/create-a-policy.api.mdx
Normal file
62
docs/api/create-a-policy.api.mdx
Normal file
File diff suppressed because one or more lines are too long
54
docs/api/create-a-route.api.mdx
Normal file
54
docs/api/create-a-route.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: create-a-route
|
||||
title: "Create a Route"
|
||||
description: "Creates a Route"
|
||||
sidebar_label: "Create a Route"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a Route","tags":["Routes"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"New Routes request","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}}}},"responses":{"200":{"description":"A Route Object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Route Id","type":"string"},"network_type":{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}},"required":["id","network_type"]},{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}],"title":"Route"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/routes","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"description":"string","network_id":"string","enabled":true,"peer":"string","network":"string","metric":0,"masquerade":true,"groups":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Route","description":{"content":"Creates a Route","type":"text/plain"},"url":{"path":["api","routes"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Route
|
||||
|
||||
|
||||
|
||||
Creates a Route
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
New Routes request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Route Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route Id","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"network_type\": \"string\",\n \"description\": \"string\",\n \"network_id\": \"string\",\n \"enabled\": true,\n \"peer\": \"string\",\n \"network\": \"string\",\n \"metric\": 0,\n \"masquerade\": true,\n \"groups\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
46
docs/api/create-a-rule.api.mdx
Normal file
46
docs/api/create-a-rule.api.mdx
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
id: create-a-rule
|
||||
title: "Create a Rule"
|
||||
description: "Creates a Rule"
|
||||
sidebar_label: "Create a Rule"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a Rule","tags":["Rules"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"New Rule request","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"type":"array","items":{"type":"string"}},"destinations":{"type":"array","items":{"type":"string"}}}}]}}}},"responses":{"200":{"description":"A Rule Object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"description":"Rule source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"Rule destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}}},"required":["sources","destinations"]}],"title":"Rule"}}}}},"method":"post","path":"/api/rules","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","description":"string","disabled":true,"flow":"string","sources":["string"],"destinations":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Rule","description":{"content":"Creates a Rule","type":"text/plain"},"url":{"path":["api","rules"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Rule
|
||||
|
||||
|
||||
|
||||
Creates a Rule
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
New Rule request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"sources"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"destinations"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Rule Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"disabled\": true,\n \"flow\": \"string\",\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/create-a-setup-key.api.mdx
Normal file
54
docs/api/create-a-setup-key.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: create-a-setup-key
|
||||
title: "Create a Setup Key"
|
||||
description: "Creates a Setup Key"
|
||||
sidebar_label: "Create a Setup Key"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a Setup Key","tags":["Setup Keys"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"New Setup Key request","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Setup Key name","type":"string"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"expires_in":{"description":"Expiration time in seconds","type":"integer"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["name","type","expires_in","revoked","auto_groups","usage_limit"],"title":"SetupKeyRequest"}}}},"responses":{"200":{"description":"A Setup Keys Object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Setup Key ID","type":"string"},"key":{"description":"Setup Key value","type":"string"},"name":{"description":"Setup key name identifier","type":"string"},"expires":{"description":"Setup Key expiration date","type":"string","format":"date-time"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"valid":{"description":"Setup key validity status","type":"boolean"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"used_times":{"description":"Usage count of setup key","type":"integer"},"last_used":{"description":"Setup key last usage date","type":"string","format":"date-time"},"state":{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"updated_at":{"description":"Setup key last update date","type":"string","format":"date-time"},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["id","key","name","expires","type","valid","revoked","used_times","last_used","state","auto_groups","updated_at","usage_limit"],"title":"SetupKey"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/setup-keys","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","type":"string","expires_in":0,"revoked":true,"auto_groups":["string"],"usage_limit":0},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Setup Key","description":{"content":"Creates a Setup Key","type":"text/plain"},"url":{"path":["api","setup-keys"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Setup Key
|
||||
|
||||
|
||||
|
||||
Creates a Setup Key
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
New Setup Key request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key name","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires_in"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Expiration time in seconds","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Setup Keys Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"key"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key value","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup Key expiration date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"valid"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key validity status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"used_times"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Usage count of setup key","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last usage date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last update date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"key\": \"string\",\n \"name\": \"string\",\n \"expires\": \"2023-04-26T12:12:56.627Z\",\n \"type\": \"string\",\n \"valid\": true,\n \"revoked\": true,\n \"used_times\": 0,\n \"last_used\": \"2023-04-26T12:12:56.627Z\",\n \"state\": \"string\",\n \"auto_groups\": [\n \"string\"\n ],\n \"updated_at\": \"2023-04-26T12:12:56.627Z\",\n \"usage_limit\": 0\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/create-token.api.mdx
Normal file
54
docs/api/create-token.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: create-token
|
||||
title: "Create a Token"
|
||||
description: "Create a new token for a user"
|
||||
sidebar_label: "Create a Token"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Create a new token for a user","tags":["Tokens"],"operationId":"createToken","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}],"requestBody":{"description":"PersonalAccessToken create parameters","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name of the token","type":"string"},"expires_in":{"description":"Expiration in days","type":"integer","minimum":1,"maximum":365}},"required":["name","expires_in"],"title":"PersonalAccessTokenRequest"}}}},"responses":{"200":{"description":"The token in plain text","content":{"application/json":{"schema":{"type":"object","properties":{"plain_token":{"description":"Plain text representation of the generated token","type":"string"},"personal_access_token":{"type":"object","properties":{"id":{"description":"ID of a token","type":"string"},"name":{"description":"Name of the token","type":"string"},"expiration_date":{"description":"Date the token expires","type":"string","format":"date-time"},"created_by":{"description":"User ID of the user who created the token","type":"string"},"created_at":{"description":"Date the token was created","type":"string","format":"date-time"},"last_used":{"description":"Date the token was last used","type":"string","format":"date-time"}},"required":["id","name","expiration_date","created_by","created_at"],"title":"PersonalAccessToken"}},"required":["plain_token","personal_access_token"],"title":"PersonalAccessTokenGenerated"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/users/{userId}/tokens","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","expires_in":0},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a Token","description":{"content":"Create a new token for a user","type":"text/plain"},"url":{"path":["api","users",":userId","tokens"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a Token
|
||||
|
||||
|
||||
|
||||
Create a new token for a user
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
PersonalAccessToken create parameters
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Name of the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires_in"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 365`"} schema={{"description":"Expiration in days","type":"integer","minimum":1,"maximum":365}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
The token in plain text
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"plain_token"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Plain text representation of the generated token","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>personal_access_token</strong><span style={{"opacity":"0.6"}}> object</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"ID of a token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Name of the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expiration_date"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token expires","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user who created the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was created","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was last used","type":"string","format":"date-time"}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"plain_token\": \"string\",\n \"personal_access_token\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"expiration_date\": \"2023-04-26T12:12:56.621Z\",\n \"created_by\": \"string\",\n \"created_at\": \"2023-04-26T12:12:56.621Z\",\n \"last_used\": \"2023-04-26T12:12:56.621Z\"\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/create-user.api.mdx
Normal file
54
docs/api/create-user.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: create-user
|
||||
title: "Create a User"
|
||||
description: "Creates a new service user or sends an invite to a regular user"
|
||||
sidebar_label: "Create a User"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Creates a new service user or sends an invite to a regular user","tags":["Users"],"operationId":"createUser","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"User invite information","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"User's Email to send invite to","type":"string"},"name":{"description":"User's full name","type":"string"},"role":{"description":"User's NetBird account role","type":"string"},"auto_groups":{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}},"is_service_user":{"description":"Is true if this user is a service user","type":"boolean"}},"required":["role","auto_groups","is_service_user"],"title":"UserCreateRequest"}}}},"responses":{"200":{"description":"A User object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"User ID","type":"string"},"email":{"description":"User's email address","type":"string"},"name":{"description":"User's name from idp provider","type":"string"},"role":{"description":"User's NetBird account role","type":"string"},"status":{"description":"User's status","type":"string","enum":["active","invited","disabled"]},"auto_groups":{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}},"is_current":{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true},"is_service_user":{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}},"required":["id","email","name","role","auto_groups","status"],"title":"User"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"post","path":"/api/users","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"email":"string","name":"string","role":"string","auto_groups":["string"],"is_service_user":true},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Create a User","description":{"content":"Creates a new service user or sends an invite to a regular user","type":"text/plain"},"url":{"path":["api","users"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "post api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Create a User
|
||||
|
||||
|
||||
|
||||
Creates a new service user or sends an invite to a regular user
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
User invite information
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"email"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's Email to send invite to","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's full name","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"role"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's NetBird account role","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"is_service_user"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if this user is a service user","type":"boolean"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A User object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's email address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's name from idp provider","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"role"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's NetBird account role","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`active`, `invited`, `disabled`]"} schema={{"description":"User's status","type":"string","enum":["active","invited","disabled"]}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"is_current"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"is_service_user"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"email\": \"string\",\n \"name\": \"string\",\n \"role\": \"string\",\n \"status\": \"active\",\n \"auto_groups\": [\n \"string\"\n ],\n \"is_current\": true,\n \"is_service_user\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-group.api.mdx
Normal file
50
docs/api/delete-a-group.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-group
|
||||
title: "Delete a Group"
|
||||
description: "Delete a Group"
|
||||
sidebar_label: "Delete a Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a Group","tags":["Groups"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/groups/{groupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Group","description":{"content":"Delete a Group","type":"text/plain"},"url":{"path":["api","groups",":groupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a group","type":"text/plain"},"type":"any","value":"","key":"groupId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Group
|
||||
|
||||
|
||||
|
||||
Delete a Group
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-nameserver-group.api.mdx
Normal file
50
docs/api/delete-a-nameserver-group.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-nameserver-group
|
||||
title: "Delete a Nameserver Group"
|
||||
description: "Delete a Nameserver Group"
|
||||
sidebar_label: "Delete a Nameserver Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a Nameserver Group","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/dns/nameservers/{nsgroupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Nameserver Group","description":{"content":"Delete a Nameserver Group","type":"text/plain"},"url":{"path":["api","dns","nameservers",":nsgroupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a Nameserver Group","type":"text/plain"},"type":"any","value":"","key":"nsgroupId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Nameserver Group
|
||||
|
||||
|
||||
|
||||
Delete a Nameserver Group
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-peer.api.mdx
Normal file
50
docs/api/delete-a-peer.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-peer
|
||||
title: "Delete a Peer"
|
||||
description: "Delete a peer"
|
||||
sidebar_label: "Delete a Peer"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a peer","tags":["Peers"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/peers/{peerId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Peer","description":{"content":"Delete a peer","type":"text/plain"},"url":{"path":["api","peers",":peerId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a peer","type":"text/plain"},"type":"any","value":"","key":"peerId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Peer
|
||||
|
||||
|
||||
|
||||
Delete a peer
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-policy.api.mdx
Normal file
50
docs/api/delete-a-policy.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-policy
|
||||
title: "Delete a Policy"
|
||||
description: "Delete a Policy"
|
||||
sidebar_label: "Delete a Policy"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a Policy","tags":["Policies"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"policyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a policy"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/policies/{policyId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Policy","description":{"content":"Delete a Policy","type":"text/plain"},"url":{"path":["api","policies",":policyId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a policy","type":"text/plain"},"type":"any","value":"","key":"policyId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Policy
|
||||
|
||||
|
||||
|
||||
Delete a Policy
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"policyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a policy"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-route.api.mdx
Normal file
50
docs/api/delete-a-route.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-route
|
||||
title: "Delete a Route"
|
||||
description: "Delete a Route"
|
||||
sidebar_label: "Delete a Route"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a Route","tags":["Routes"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/routes/{routeId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Route","description":{"content":"Delete a Route","type":"text/plain"},"url":{"path":["api","routes",":routeId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a route","type":"text/plain"},"type":"any","value":"","key":"routeId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Route
|
||||
|
||||
|
||||
|
||||
Delete a Route
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-a-rule.api.mdx
Normal file
50
docs/api/delete-a-rule.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-a-rule
|
||||
title: "Delete a Rule"
|
||||
description: "Delete a Rule"
|
||||
sidebar_label: "Delete a Rule"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a Rule","tags":["Rules"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/rules/{ruleId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Rule","description":{"content":"Delete a Rule","type":"text/plain"},"url":{"path":["api","rules",":ruleId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a rule","type":"text/plain"},"type":"any","value":"","key":"ruleId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Rule
|
||||
|
||||
|
||||
|
||||
Delete a Rule
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-token.api.mdx
Normal file
50
docs/api/delete-token.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-token
|
||||
title: "Delete a Token"
|
||||
description: "Delete a token for a user"
|
||||
sidebar_label: "Delete a Token"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a token for a user","tags":["Tokens"],"operationId":"deleteToken","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"},{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a token"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/users/{userId}/tokens/{tokenId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Token","description":{"content":"Delete a token for a user","type":"text/plain"},"url":{"path":["api","users",":userId","tokens",":tokenId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"},{"disabled":false,"description":{"content":"(Required) The unique identifier of a token","type":"text/plain"},"type":"any","value":"","key":"tokenId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a Token
|
||||
|
||||
|
||||
|
||||
Delete a token for a user
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a token"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/delete-user.api.mdx
Normal file
50
docs/api/delete-user.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: delete-user
|
||||
title: "Delete a User"
|
||||
description: "Delete a User"
|
||||
sidebar_label: "Delete a User"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Delete a User","tags":["Users"],"operationId":"deleteUser","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/users/{userId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a User","description":{"content":"Delete a User","type":"text/plain"},"url":{"path":["api","users",":userId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "delete api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Delete a User
|
||||
|
||||
|
||||
|
||||
Delete a User
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
Delete status code
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/get-accounts.api.mdx
Normal file
50
docs/api/get-accounts.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: get-accounts
|
||||
title: "List all Accounts"
|
||||
description: "Returns a list of accounts of a user. Always returns a list of one account."
|
||||
sidebar_label: "List all Accounts"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of accounts of a user. Always returns a list of one account.","tags":["Accounts"],"operationId":"getAccounts","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON array of accounts","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"description":"Account ID","type":"string"},"settings":{"properties":{"peer_login_expiration_enabled":{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"},"peer_login_expiration":{"description":"Period of time after which peer login expires (seconds).","type":"integer"}},"required":["peer_login_expiration_enabled","peer_login_expiration"],"title":"AccountSettings"}},"required":["id","settings"],"title":"Account"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/accounts","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Accounts","description":{"content":"Returns a list of accounts of a user. Always returns a list of one account.","type":"text/plain"},"url":{"path":["api","accounts"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Accounts
|
||||
|
||||
|
||||
|
||||
Returns a list of accounts of a user. Always returns a list of one account.
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON array of accounts
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Account ID","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>settings</strong><span style={{"opacity":"0.6"}}> AccountSettings</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"peer_login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer_login_expiration"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Period of time after which peer login expires (seconds).","type":"integer"}}></SchemaItem></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"settings\": {\n \"peer_login_expiration_enabled\": true,\n \"peer_login_expiration\": 0\n }\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/get-peer.api.mdx
Normal file
54
docs/api/get-peer.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: get-peer
|
||||
title: "Retrieve a Peer"
|
||||
description: "Get information about a peer"
|
||||
sidebar_label: "Retrieve a Peer"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a peer","tags":["Peers"],"operationId":"getPeer","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}],"responses":{"200":{"description":"A Peer object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"},{"type":"object","properties":{"ip":{"description":"Peer's IP address","type":"string"},"connected":{"description":"Peer to Management connection status","type":"boolean"},"last_seen":{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"},"os":{"description":"Peer's operating system and version","type":"string"},"version":{"description":"Peer's daemon or cli version","type":"string"},"groups":{"description":"Groups that the peer belongs to","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"ssh_enabled":{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"},"user_id":{"description":"User ID of the user that enrolled this peer","type":"string"},"hostname":{"description":"Hostname of the machine","type":"string"},"ui_version":{"description":"Peer's desktop UI version","type":"string"},"dns_label":{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"},"login_expiration_enabled":{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"},"login_expired":{"description":"Indicates whether peer's login expired or not","type":"boolean"},"last_login":{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}},"required":["ip","connected","last_seen","os","version","groups","ssh_enabled","hostname","dns_label","login_expiration_enabled","login_expired","last_login"]}],"title":"Peer"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/peers/{peerId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Peer","description":{"content":"Get information about a peer","type":"text/plain"},"url":{"path":["api","peers",":peerId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a peer","type":"text/plain"},"type":"any","value":"","key":"peerId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Peer
|
||||
|
||||
|
||||
|
||||
Get information about a peer
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Peer object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's IP address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"connected"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Peer to Management connection status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_seen"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"os"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's operating system and version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's daemon or cli version","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>groups</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Groups that the peer belongs to
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"ssh_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"user_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user that enrolled this peer","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"hostname"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Hostname of the machine","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ui_version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's desktop UI version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"dns_label"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expired"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer's login expired or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_login"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ip\": \"string\",\n \"connected\": true,\n \"last_seen\": \"2023-04-26T12:12:56.624Z\",\n \"os\": \"string\",\n \"version\": \"string\",\n \"groups\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"ssh_enabled\": true,\n \"user_id\": \"string\",\n \"hostname\": \"string\",\n \"ui_version\": \"string\",\n \"dns_label\": \"string\",\n \"login_expiration_enabled\": true,\n \"login_expired\": true,\n \"last_login\": \"2023-04-26T12:12:56.624Z\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/get-peers.api.mdx
Normal file
54
docs/api/get-peers.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: get-peers
|
||||
title: "List all Peers"
|
||||
description: "Returns a list of all peers"
|
||||
sidebar_label: "List all Peers"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all peers","tags":["Peers"],"operationId":"getPeers","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Peers","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"},{"type":"object","properties":{"ip":{"description":"Peer's IP address","type":"string"},"connected":{"description":"Peer to Management connection status","type":"boolean"},"last_seen":{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"},"os":{"description":"Peer's operating system and version","type":"string"},"version":{"description":"Peer's daemon or cli version","type":"string"},"groups":{"description":"Groups that the peer belongs to","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"ssh_enabled":{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"},"user_id":{"description":"User ID of the user that enrolled this peer","type":"string"},"hostname":{"description":"Hostname of the machine","type":"string"},"ui_version":{"description":"Peer's desktop UI version","type":"string"},"dns_label":{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"},"login_expiration_enabled":{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"},"login_expired":{"description":"Indicates whether peer's login expired or not","type":"boolean"},"last_login":{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}},"required":["ip","connected","last_seen","os","version","groups","ssh_enabled","hostname","dns_label","login_expiration_enabled","login_expired","last_login"]}],"title":"Peer"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/peers","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Peers","description":{"content":"Returns a list of all peers","type":"text/plain"},"url":{"path":["api","peers"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Peers
|
||||
|
||||
|
||||
|
||||
Returns a list of all peers
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Peers
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's IP address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"connected"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Peer to Management connection status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_seen"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"os"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's operating system and version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's daemon or cli version","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>groups</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Groups that the peer belongs to
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"ssh_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"user_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user that enrolled this peer","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"hostname"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Hostname of the machine","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ui_version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's desktop UI version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"dns_label"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expired"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer's login expired or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_login"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ip\": \"string\",\n \"connected\": true,\n \"last_seen\": \"2023-04-26T12:12:56.623Z\",\n \"os\": \"string\",\n \"version\": \"string\",\n \"groups\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"ssh_enabled\": true,\n \"user_id\": \"string\",\n \"hostname\": \"string\",\n \"ui_version\": \"string\",\n \"dns_label\": \"string\",\n \"login_expiration_enabled\": true,\n \"login_expired\": true,\n \"last_login\": \"2023-04-26T12:12:56.623Z\"\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/get-token.api.mdx
Normal file
50
docs/api/get-token.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: get-token
|
||||
title: "Retrieve a Token"
|
||||
description: "Returns a specific token for a user"
|
||||
sidebar_label: "Retrieve a Token"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a specific token for a user","tags":["Tokens"],"operationId":"getToken","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"},{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a token"}],"responses":{"200":{"description":"A PersonalAccessTokens Object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"ID of a token","type":"string"},"name":{"description":"Name of the token","type":"string"},"expiration_date":{"description":"Date the token expires","type":"string","format":"date-time"},"created_by":{"description":"User ID of the user who created the token","type":"string"},"created_at":{"description":"Date the token was created","type":"string","format":"date-time"},"last_used":{"description":"Date the token was last used","type":"string","format":"date-time"}},"required":["id","name","expiration_date","created_by","created_at"],"title":"PersonalAccessToken"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/users/{userId}/tokens/{tokenId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Token","description":{"content":"Returns a specific token for a user","type":"text/plain"},"url":{"path":["api","users",":userId","tokens",":tokenId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"},{"disabled":false,"description":{"content":"(Required) The unique identifier of a token","type":"text/plain"},"type":"any","value":"","key":"tokenId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Token
|
||||
|
||||
|
||||
|
||||
Returns a specific token for a user
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a token"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A PersonalAccessTokens Object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"ID of a token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Name of the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expiration_date"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token expires","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user who created the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was created","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was last used","type":"string","format":"date-time"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"expiration_date\": \"2023-04-26T12:12:56.621Z\",\n \"created_by\": \"string\",\n \"created_at\": \"2023-04-26T12:12:56.621Z\",\n \"last_used\": \"2023-04-26T12:12:56.621Z\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/get-tokens.api.mdx
Normal file
50
docs/api/get-tokens.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: get-tokens
|
||||
title: "List all Tokens"
|
||||
description: "Returns a list of all tokens for a user"
|
||||
sidebar_label: "List all Tokens"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all tokens for a user","tags":["Tokens"],"operationId":"getTokens","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}],"responses":{"200":{"description":"A JSON Array of PersonalAccessTokens","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"ID of a token","type":"string"},"name":{"description":"Name of the token","type":"string"},"expiration_date":{"description":"Date the token expires","type":"string","format":"date-time"},"created_by":{"description":"User ID of the user who created the token","type":"string"},"created_at":{"description":"Date the token was created","type":"string","format":"date-time"},"last_used":{"description":"Date the token was last used","type":"string","format":"date-time"}},"required":["id","name","expiration_date","created_by","created_at"],"title":"PersonalAccessToken"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/users/{userId}/tokens","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Tokens","description":{"content":"Returns a list of all tokens for a user","type":"text/plain"},"url":{"path":["api","users",":userId","tokens"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Tokens
|
||||
|
||||
|
||||
|
||||
Returns a list of all tokens for a user
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of PersonalAccessTokens
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"ID of a token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Name of the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expiration_date"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token expires","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user who created the token","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was created","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Date the token was last used","type":"string","format":"date-time"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"expiration_date\": \"2023-04-26T12:12:56.620Z\",\n \"created_by\": \"string\",\n \"created_at\": \"2023-04-26T12:12:56.620Z\",\n \"last_used\": \"2023-04-26T12:12:56.620Z\"\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/get-users.api.mdx
Normal file
50
docs/api/get-users.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: get-users
|
||||
title: "Retrieve Users"
|
||||
description: "Returns a list of all users"
|
||||
sidebar_label: "Retrieve Users"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all users","tags":["Users"],"operationId":"getUsers","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"query","name":"service_user","schema":{"type":"boolean"},"description":"Filters users and returns either regular users or service users"}],"responses":{"200":{"description":"A JSON array of Users","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"User ID","type":"string"},"email":{"description":"User's email address","type":"string"},"name":{"description":"User's name from idp provider","type":"string"},"role":{"description":"User's NetBird account role","type":"string"},"status":{"description":"User's status","type":"string","enum":["active","invited","disabled"]},"auto_groups":{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}},"is_current":{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true},"is_service_user":{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}},"required":["id","email","name","role","auto_groups","status"],"title":"User"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/users","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve Users","description":{"content":"Returns a list of all users","type":"text/plain"},"url":{"path":["api","users"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Filters users and returns either regular users or service users","type":"text/plain"},"key":"service_user","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve Users
|
||||
|
||||
|
||||
|
||||
Returns a list of all users
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"query","name":"service_user","schema":{"type":"boolean"},"description":"Filters users and returns either regular users or service users"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON array of Users
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's email address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's name from idp provider","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"role"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's NetBird account role","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`active`, `invited`, `disabled`]"} schema={{"description":"User's status","type":"string","enum":["active","invited","disabled"]}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"is_current"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"is_service_user"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"email\": \"string\",\n \"name\": \"string\",\n \"role\": \"string\",\n \"status\": \"active\",\n \"auto_groups\": [\n \"string\"\n ],\n \"is_current\": true,\n \"is_service_user\": true\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/list-all-events.api.mdx
Normal file
54
docs/api/list-all-events.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: list-all-events
|
||||
title: "List all Events"
|
||||
description: "Returns a list of all events"
|
||||
sidebar_label: "List all Events"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all events","tags":["Events"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Events","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Event unique identifier","type":"string"},"timestamp":{"description":"The date and time when the event occurred","type":"string","format":"date-time"},"activity":{"description":"The activity that occurred during the event","type":"string"},"activity_code":{"description":"The string code of the activity that occurred during the event","type":"string","enum":["user.peer.delete","user.join","user.invite","user.peer.add","user.group.add","user.group.delete","user.role.update","setupkey.peer.add","setupkey.add","setupkey.update","setupkey.revoke","setupkey.overuse","setupkey.group.delete","setupkey.group.add","rule.add","rule.delete","rule.update","policy.add","policy.delete","policy.update","group.add","group.update","dns.setting.disabled.management.group.add","dns.setting.disabled.management.group.delete","account.create","account.setting.peer.login.expiration.update","account.setting.peer.login.expiration.disable","account.setting.peer.login.expiration.enable","route.add","route.delete","route.update","nameserver.group.add","nameserver.group.delete","nameserver.group.update","peer.ssh.disable","peer.ssh.enable","peer.rename","peer.login.expiration.disable","peer.login.expiration.enable"]},"initiator_id":{"description":"The ID of the initiator of the event. E.g., an ID of a user that triggered the event.","type":"string"},"target_id":{"description":"The ID of the target of the event. E.g., an ID of the peer that a user removed.","type":"string"},"meta":{"description":"The metadata of the event","type":"object","additionalProperties":{"type":"string"}}},"required":["id","timestamp","activity","activity_code","initiator_id","target_id","meta"],"title":"Event"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/events","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Events","description":{"content":"Returns a list of all events","type":"text/plain"},"url":{"path":["api","events"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Events
|
||||
|
||||
|
||||
|
||||
Returns a list of all events
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Events
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Event unique identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"The date and time when the event occurred","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"activity"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The activity that occurred during the event","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"activity_code"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`user.peer.delete`, `user.join`, `user.invite`, `user.peer.add`, `user.group.add`, `user.group.delete`, `user.role.update`, `setupkey.peer.add`, `setupkey.add`, `setupkey.update`, `setupkey.revoke`, `setupkey.overuse`, `setupkey.group.delete`, `setupkey.group.add`, `rule.add`, `rule.delete`, `rule.update`, `policy.add`, `policy.delete`, `policy.update`, `group.add`, `group.update`, `dns.setting.disabled.management.group.add`, `dns.setting.disabled.management.group.delete`, `account.create`, `account.setting.peer.login.expiration.update`, `account.setting.peer.login.expiration.disable`, `account.setting.peer.login.expiration.enable`, `route.add`, `route.delete`, `route.update`, `nameserver.group.add`, `nameserver.group.delete`, `nameserver.group.update`, `peer.ssh.disable`, `peer.ssh.enable`, `peer.rename`, `peer.login.expiration.disable`, `peer.login.expiration.enable`]"} schema={{"description":"The string code of the activity that occurred during the event","type":"string","enum":["user.peer.delete","user.join","user.invite","user.peer.add","user.group.add","user.group.delete","user.role.update","setupkey.peer.add","setupkey.add","setupkey.update","setupkey.revoke","setupkey.overuse","setupkey.group.delete","setupkey.group.add","rule.add","rule.delete","rule.update","policy.add","policy.delete","policy.update","group.add","group.update","dns.setting.disabled.management.group.add","dns.setting.disabled.management.group.delete","account.create","account.setting.peer.login.expiration.update","account.setting.peer.login.expiration.disable","account.setting.peer.login.expiration.enable","route.add","route.delete","route.update","nameserver.group.add","nameserver.group.delete","nameserver.group.update","peer.ssh.disable","peer.ssh.enable","peer.rename","peer.login.expiration.disable","peer.login.expiration.enable"]}}></SchemaItem><SchemaItem collapsible={false} name={"initiator_id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The ID of the initiator of the event. E.g., an ID of a user that triggered the event.","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"target_id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The ID of the target of the event. E.g., an ID of the peer that a user removed.","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>meta</strong><span style={{"opacity":"0.6"}}> object</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
The metadata of the event
|
||||
|
||||
</div><li><div><code>property name*</code><span style={{"opacity":"0.6"}}> string</span></div></li></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"timestamp\": \"2023-04-26T12:12:56.650Z\",\n \"activity\": \"string\",\n \"activity_code\": \"user.peer.delete\",\n \"initiator_id\": \"string\",\n \"target_id\": \"string\",\n \"meta\": {}\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/list-all-groups.api.mdx
Normal file
54
docs/api/list-all-groups.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: list-all-groups
|
||||
title: "List all Groups"
|
||||
description: "Returns a list of all Groups"
|
||||
sidebar_label: "List all Groups"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all Groups","tags":["Groups"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Groups","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"},{"type":"object","properties":{"peers":{"description":"List of peers object","type":"array","items":{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"}}},"required":["peers"]}],"title":"Group"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/groups","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Groups","description":{"content":"Returns a list of all Groups","type":"text/plain"},"url":{"path":["api","groups"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Groups
|
||||
|
||||
|
||||
|
||||
Returns a list of all Groups
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Groups
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>peers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
List of peers object
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0,\n \"peers\": [\n {\n \"id\": \"string\",\n \"name\": \"string\"\n }\n ]\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/list-all-nameserver-groups.api.mdx
Normal file
54
docs/api/list-all-nameserver-groups.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: list-all-nameserver-groups
|
||||
title: "List all Nameserver Groups"
|
||||
description: "Returns a list of all Nameserver Groups"
|
||||
sidebar_label: "List all Nameserver Groups"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all Nameserver Groups","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Nameserver Groups","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"Nameserver group ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}],"title":"NameserverGroup"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/dns/nameservers","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Nameserver Groups","description":{"content":"Returns a list of all Nameserver Groups","type":"text/plain"},"url":{"path":["api","dns","nameservers"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Nameserver Groups
|
||||
|
||||
|
||||
|
||||
Returns a list of all Nameserver Groups
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Nameserver Groups
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"nameservers\": [\n {\n \"ip\": \"string\",\n \"ns_type\": \"udp\",\n \"port\": 0\n }\n ],\n \"enabled\": true,\n \"groups\": [\n \"string\"\n ],\n \"primary\": true,\n \"domains\": [\n \"string\"\n ]\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/list-all-policies.api.mdx
Normal file
62
docs/api/list-all-policies.api.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
id: list-all-policies
|
||||
title: "List all Policies"
|
||||
description: "Returns a list of all Policies"
|
||||
sidebar_label: "List all Policies"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all Policies","tags":["Policies"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Policies","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"description":"Policy name identifier","type":"string"},"description":{"description":"Policy friendly description","type":"string"},"enabled":{"description":"Policy status","type":"boolean"},"query":{"description":"Policy Rego query","type":"string"},"rules":{"description":"Policy rule object for policy UI editor","type":"array","items":{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"},"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"enabled":{"description":"Rules status","type":"boolean"},"sources":{"description":"policy source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"policy destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"action":{"description":"policy accept or drops packets","type":"string","enum":["accept","drop"]}},"required":["name","sources","destinations","action","enabled"],"title":"PolicyRule"}}},"required":["name","description","enabled","query","rules"],"title":"PolicyMinimum"},{"type":"object","properties":{"id":{"description":"Policy ID","type":"string"}},"required":["id"]}],"title":"Policy"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/policies","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Policies","description":{"content":"Returns a list of all Policies","type":"text/plain"},"url":{"path":["api","policies"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Policies
|
||||
|
||||
|
||||
|
||||
Returns a list of all Policies
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Policies
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Policy status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"query"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy Rego query","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>rules</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Policy rule object for policy UI editor
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
policy source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
policy destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"action"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`accept`, `drop`]"} schema={{"description":"policy accept or drops packets","type":"string","enum":["accept","drop"]}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy ID","type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"name\": \"string\",\n \"description\": \"string\",\n \"enabled\": true,\n \"query\": \"string\",\n \"rules\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"enabled\": true,\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"action\": \"accept\"\n }\n ],\n \"id\": \"string\"\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/list-all-routes.api.mdx
Normal file
50
docs/api/list-all-routes.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: list-all-routes
|
||||
title: "List all Routes"
|
||||
description: "Returns a list of all routes"
|
||||
sidebar_label: "List all Routes"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all routes","tags":["Routes"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Routes","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"Route Id","type":"string"},"network_type":{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}},"required":["id","network_type"]},{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}],"title":"Route"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/routes","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Routes","description":{"content":"Returns a list of all routes","type":"text/plain"},"url":{"path":["api","routes"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Routes
|
||||
|
||||
|
||||
|
||||
Returns a list of all routes
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Routes
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route Id","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"network_type\": \"string\",\n \"description\": \"string\",\n \"network_id\": \"string\",\n \"enabled\": true,\n \"peer\": \"string\",\n \"network\": \"string\",\n \"metric\": 0,\n \"masquerade\": true,\n \"groups\": [\n \"string\"\n ]\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
58
docs/api/list-all-rules.api.mdx
Normal file
58
docs/api/list-all-rules.api.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: list-all-rules
|
||||
title: "List all Rules"
|
||||
description: "Returns a list of all Rules"
|
||||
sidebar_label: "List all Rules"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all Rules","tags":["Rules"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Rules","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"description":"Rule source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"Rule destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}}},"required":["sources","destinations"]}],"title":"Rule"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/rules","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Rules","description":{"content":"Returns a list of all Rules","type":"text/plain"},"url":{"path":["api","rules"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Rules
|
||||
|
||||
|
||||
|
||||
Returns a list of all Rules
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Rules
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"disabled\": true,\n \"flow\": \"string\",\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ]\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/list-all-setup-keys.api.mdx
Normal file
50
docs/api/list-all-setup-keys.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: list-all-setup-keys
|
||||
title: "List all Setup Keys"
|
||||
description: "Returns a list of all Setup Keys"
|
||||
sidebar_label: "List all Setup Keys"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a list of all Setup Keys","tags":["Setup Keys"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Array of Setup keys","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Setup Key ID","type":"string"},"key":{"description":"Setup Key value","type":"string"},"name":{"description":"Setup key name identifier","type":"string"},"expires":{"description":"Setup Key expiration date","type":"string","format":"date-time"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"valid":{"description":"Setup key validity status","type":"boolean"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"used_times":{"description":"Usage count of setup key","type":"integer"},"last_used":{"description":"Setup key last usage date","type":"string","format":"date-time"},"state":{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"updated_at":{"description":"Setup key last update date","type":"string","format":"date-time"},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["id","key","name","expires","type","valid","revoked","used_times","last_used","state","auto_groups","updated_at","usage_limit"],"title":"SetupKey"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/setup-keys","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"List all Setup Keys","description":{"content":"Returns a list of all Setup Keys","type":"text/plain"},"url":{"path":["api","setup-keys"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## List all Setup Keys
|
||||
|
||||
|
||||
|
||||
Returns a list of all Setup Keys
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Array of Setup keys
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"key"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key value","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup Key expiration date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"valid"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key validity status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"used_times"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Usage count of setup key","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last usage date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last update date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"id\": \"string\",\n \"key\": \"string\",\n \"name\": \"string\",\n \"expires\": \"2023-04-26T12:12:56.626Z\",\n \"type\": \"string\",\n \"valid\": true,\n \"revoked\": true,\n \"used_times\": 0,\n \"last_used\": \"2023-04-26T12:12:56.626Z\",\n \"state\": \"string\",\n \"auto_groups\": [\n \"string\"\n ],\n \"updated_at\": \"2023-04-26T12:12:56.626Z\",\n \"usage_limit\": 0\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
29
docs/api/netbird-rest-api.info.mdx
Normal file
29
docs/api/netbird-rest-api.info.mdx
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
id: netbird-rest-api
|
||||
title: "NetBird REST API"
|
||||
description: "API to manipulate groups, rules, policies and retrieve information about peers and users"
|
||||
sidebar_label: Introduction
|
||||
sidebar_position: 0
|
||||
hide_title: true
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiLogo from "@theme/ApiLogo";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Export from "@theme/ApiDemoPanel/Export";
|
||||
|
||||
<span className={"theme-doc-version-badge badge badge--secondary"}>Version: 0.0.1</span>
|
||||
|
||||
# NetBird REST API
|
||||
|
||||
|
||||
|
||||
API to manipulate groups, rules, policies and retrieve information about peers and users
|
||||
|
||||
<div style={{"marginBottom":"2rem"}}><h2 id={"authentication"} style={{"marginBottom":"1rem"}}>Authentication</h2><SchemaTabs className={"openapi-tabs__security-schemes"}><TabItem label={"HTTP: Bearer Auth"} value={"BearerAuth"}><div><table><tbody><tr><th>Security Scheme Type:</th><td>http</td></tr><tr><th>HTTP Authorization Scheme:</th><td>bearer</td></tr><tr><th>Bearer format:</th><td>JWT</td></tr></tbody></table></div></TabItem><TabItem label={"API Key: TokenAuth"} value={"TokenAuth"}>
|
||||
|
||||
Prefix the value with \"Token\" to indicate the custom authorization type
|
||||
|
||||
<div><table><tbody><tr><th>Security Scheme Type:</th><td>apiKey</td></tr><tr><th>Header parameter name:</th><td>Authorization</td></tr></tbody></table></div></TabItem></SchemaTabs></div>
|
||||
|
||||
54
docs/api/retrieve-a-group.api.mdx
Normal file
54
docs/api/retrieve-a-group.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: retrieve-a-group
|
||||
title: "Retrieve a Group"
|
||||
description: "Get information about a Group"
|
||||
sidebar_label: "Retrieve a Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Group","tags":["Groups"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}],"responses":{"200":{"description":"A Group object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"},{"type":"object","properties":{"peers":{"description":"List of peers object","type":"array","items":{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"}}},"required":["peers"]}],"title":"Group"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/groups/{groupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Group","description":{"content":"Get information about a Group","type":"text/plain"},"url":{"path":["api","groups",":groupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a group","type":"text/plain"},"type":"any","value":"","key":"groupId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Group
|
||||
|
||||
|
||||
|
||||
Get information about a Group
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Group object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>peers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
List of peers object
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0,\n \"peers\": [\n {\n \"id\": \"string\",\n \"name\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/retrieve-a-nameserver-group.api.mdx
Normal file
54
docs/api/retrieve-a-nameserver-group.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: retrieve-a-nameserver-group
|
||||
title: "Retrieve a Nameserver Group"
|
||||
description: "Get information about a Nameserver Groups"
|
||||
sidebar_label: "Retrieve a Nameserver Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Nameserver Groups","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}],"responses":{"200":{"description":"A Nameserver Group object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Nameserver group ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}],"title":"NameserverGroup"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/dns/nameservers/{nsgroupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Nameserver Group","description":{"content":"Get information about a Nameserver Groups","type":"text/plain"},"url":{"path":["api","dns","nameservers",":nsgroupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a Nameserver Group","type":"text/plain"},"type":"any","value":"","key":"nsgroupId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Nameserver Group
|
||||
|
||||
|
||||
|
||||
Get information about a Nameserver Groups
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Nameserver Group object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"nameservers\": [\n {\n \"ip\": \"string\",\n \"ns_type\": \"udp\",\n \"port\": 0\n }\n ],\n \"enabled\": true,\n \"groups\": [\n \"string\"\n ],\n \"primary\": true,\n \"domains\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/retrieve-a-policy.api.mdx
Normal file
62
docs/api/retrieve-a-policy.api.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
id: retrieve-a-policy
|
||||
title: "Retrieve a Policy"
|
||||
description: "Get information about a Policies"
|
||||
sidebar_label: "Retrieve a Policy"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Policies","tags":["Policies"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"policyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a policy"}],"responses":{"200":{"description":"A Policy object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"description":"Policy name identifier","type":"string"},"description":{"description":"Policy friendly description","type":"string"},"enabled":{"description":"Policy status","type":"boolean"},"query":{"description":"Policy Rego query","type":"string"},"rules":{"description":"Policy rule object for policy UI editor","type":"array","items":{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"},"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"enabled":{"description":"Rules status","type":"boolean"},"sources":{"description":"policy source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"policy destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"action":{"description":"policy accept or drops packets","type":"string","enum":["accept","drop"]}},"required":["name","sources","destinations","action","enabled"],"title":"PolicyRule"}}},"required":["name","description","enabled","query","rules"],"title":"PolicyMinimum"},{"type":"object","properties":{"id":{"description":"Policy ID","type":"string"}},"required":["id"]}],"title":"Policy"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/policies/{policyId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Policy","description":{"content":"Get information about a Policies","type":"text/plain"},"url":{"path":["api","policies",":policyId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a policy","type":"text/plain"},"type":"any","value":"","key":"policyId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Policy
|
||||
|
||||
|
||||
|
||||
Get information about a Policies
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"policyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a policy"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Policy object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Policy status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"query"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy Rego query","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>rules</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Policy rule object for policy UI editor
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
policy source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
policy destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"action"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`accept`, `drop`]"} schema={{"description":"policy accept or drops packets","type":"string","enum":["accept","drop"]}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Policy ID","type":"string"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"name\": \"string\",\n \"description\": \"string\",\n \"enabled\": true,\n \"query\": \"string\",\n \"rules\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"enabled\": true,\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"action\": \"accept\"\n }\n ],\n \"id\": \"string\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/retrieve-a-route.api.mdx
Normal file
50
docs/api/retrieve-a-route.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: retrieve-a-route
|
||||
title: "Retrieve a Route"
|
||||
description: "Get information about a Routes"
|
||||
sidebar_label: "Retrieve a Route"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Routes","tags":["Routes"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}],"responses":{"200":{"description":"A Route object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Route Id","type":"string"},"network_type":{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}},"required":["id","network_type"]},{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}],"title":"Route"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/routes/{routeId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Route","description":{"content":"Get information about a Routes","type":"text/plain"},"url":{"path":["api","routes",":routeId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a route","type":"text/plain"},"type":"any","value":"","key":"routeId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Route
|
||||
|
||||
|
||||
|
||||
Get information about a Routes
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Route object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route Id","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"network_type\": \"string\",\n \"description\": \"string\",\n \"network_id\": \"string\",\n \"enabled\": true,\n \"peer\": \"string\",\n \"network\": \"string\",\n \"metric\": 0,\n \"masquerade\": true,\n \"groups\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
58
docs/api/retrieve-a-rule.api.mdx
Normal file
58
docs/api/retrieve-a-rule.api.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: retrieve-a-rule
|
||||
title: "Retrieve a Rule"
|
||||
description: "Get information about a Rules"
|
||||
sidebar_label: "Retrieve a Rule"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Rules","tags":["Rules"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}],"responses":{"200":{"description":"A Rule object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"description":"Rule source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"Rule destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}}},"required":["sources","destinations"]}],"title":"Rule"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/rules/{ruleId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Rule","description":{"content":"Get information about a Rules","type":"text/plain"},"url":{"path":["api","rules",":ruleId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a rule","type":"text/plain"},"type":"any","value":"","key":"ruleId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Rule
|
||||
|
||||
|
||||
|
||||
Get information about a Rules
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Rule object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"disabled\": true,\n \"flow\": \"string\",\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/retrieve-a-setup-key.api.mdx
Normal file
50
docs/api/retrieve-a-setup-key.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: retrieve-a-setup-key
|
||||
title: "Retrieve a Setup Key"
|
||||
description: "Get information about a Setup Key"
|
||||
sidebar_label: "Retrieve a Setup Key"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Get information about a Setup Key","tags":["Setup Keys"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"keyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a setup key"}],"responses":{"200":{"description":"A Setup Key object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Setup Key ID","type":"string"},"key":{"description":"Setup Key value","type":"string"},"name":{"description":"Setup key name identifier","type":"string"},"expires":{"description":"Setup Key expiration date","type":"string","format":"date-time"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"valid":{"description":"Setup key validity status","type":"boolean"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"used_times":{"description":"Usage count of setup key","type":"integer"},"last_used":{"description":"Setup key last usage date","type":"string","format":"date-time"},"state":{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"updated_at":{"description":"Setup key last update date","type":"string","format":"date-time"},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["id","key","name","expires","type","valid","revoked","used_times","last_used","state","auto_groups","updated_at","usage_limit"],"title":"SetupKey"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/setup-keys/{keyId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve a Setup Key","description":{"content":"Get information about a Setup Key","type":"text/plain"},"url":{"path":["api","setup-keys",":keyId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a setup key","type":"text/plain"},"type":"any","value":"","key":"keyId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve a Setup Key
|
||||
|
||||
|
||||
|
||||
Get information about a Setup Key
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"keyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a setup key"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Setup Key object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"key"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key value","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup Key expiration date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"valid"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key validity status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"used_times"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Usage count of setup key","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last usage date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last update date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"key\": \"string\",\n \"name\": \"string\",\n \"expires\": \"2023-04-26T12:12:56.627Z\",\n \"type\": \"string\",\n \"valid\": true,\n \"revoked\": true,\n \"used_times\": 0,\n \"last_used\": \"2023-04-26T12:12:56.627Z\",\n \"state\": \"string\",\n \"auto_groups\": [\n \"string\"\n ],\n \"updated_at\": \"2023-04-26T12:12:56.627Z\",\n \"usage_limit\": 0\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
50
docs/api/retrieve-dns-settings.api.mdx
Normal file
50
docs/api/retrieve-dns-settings.api.mdx
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
id: retrieve-dns-settings
|
||||
title: "Retrieve DNS Settings"
|
||||
description: "Returns a DNS settings object"
|
||||
sidebar_label: "Retrieve DNS Settings"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Returns a DNS settings object","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"responses":{"200":{"description":"A JSON Object of DNS Setting","content":{"application/json":{"schema":{"items":{"type":"object","properties":{"disabled_management_groups":{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}},"required":["disabled_management_groups"],"title":"DNSSettings"}}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"get","path":"/api/dns/settings","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Retrieve DNS Settings","description":{"content":"Returns a DNS settings object","type":"text/plain"},"url":{"path":["api","dns","settings"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "get api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Retrieve DNS Settings
|
||||
|
||||
|
||||
|
||||
Returns a DNS settings object
|
||||
|
||||
<div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Object of DNS Setting
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"disabled_management_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n {\n \"disabled_management_groups\": [\n \"string\"\n ]\n }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
1
docs/api/sidebar.js
Normal file
1
docs/api/sidebar.js
Normal file
File diff suppressed because one or more lines are too long
58
docs/api/update-a-group.api.mdx
Normal file
58
docs/api/update-a-group.api.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: update-a-group
|
||||
title: "Update a Group"
|
||||
description: "Update/Replace a Group"
|
||||
sidebar_label: "Update a Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update/Replace a Group","tags":["Groups"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}],"requestBody":{"description":"Update Group request","content":{"application/json":{"schema":{"type":"object","properties":{"Name":{"type":"string"},"Peers":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"A Group object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"},{"type":"object","properties":{"peers":{"description":"List of peers object","type":"array","items":{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"}}},"required":["peers"]}],"title":"Group"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/groups/{groupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"Name":"string","Peers":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Group","description":{"content":"Update/Replace a Group","type":"text/plain"},"url":{"path":["api","groups",":groupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a group","type":"text/plain"},"type":"any","value":"","key":"groupId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Group
|
||||
|
||||
|
||||
|
||||
Update/Replace a Group
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"groupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a group"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
Update Group request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"Name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"Peers"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Group object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>peers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
List of peers object
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0,\n \"peers\": [\n {\n \"id\": \"string\",\n \"name\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/update-a-nameserver-group.api.mdx
Normal file
62
docs/api/update-a-nameserver-group.api.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
id: update-a-nameserver-group
|
||||
title: "Update a Nameserver Group"
|
||||
description: "Update/Replace a Nameserver Group"
|
||||
sidebar_label: "Update a Nameserver Group"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update/Replace a Nameserver Group","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}],"requestBody":{"description":"Update Nameserver Group request","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}}}},"responses":{"200":{"description":"A Nameserver Group object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Nameserver group ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1},"description":{"description":"Nameserver group description","type":"string"},"nameservers":{"description":"Nameserver group","minLength":1,"maxLength":2,"type":"array","items":{"type":"object","properties":{"ip":{"description":"Nameserver IP","type":"string"},"ns_type":{"description":"Nameserver Type","type":"string","enum":["udp"]},"port":{"description":"Nameserver Port","type":"integer"}},"required":["ip","ns_type","port"],"title":"Nameserver"}},"enabled":{"description":"Nameserver group status","type":"boolean"},"groups":{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}},"primary":{"description":"Nameserver group primary status","type":"boolean"},"domains":{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","description","nameservers","enabled","groups","primary","domains"],"title":"NameserverGroupRequest"}],"title":"NameserverGroup"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/dns/nameservers/{nsgroupId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","description":"string","nameservers":[{"ip":"string","ns_type":"udp","port":0}],"enabled":true,"groups":["string"],"primary":true,"domains":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Nameserver Group","description":{"content":"Update/Replace a Nameserver Group","type":"text/plain"},"url":{"path":["api","dns","nameservers",":nsgroupId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a Nameserver Group","type":"text/plain"},"type":"any","value":"","key":"nsgroupId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Nameserver Group
|
||||
|
||||
|
||||
|
||||
Update/Replace a Nameserver Group
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"nsgroupId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a Nameserver Group"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
Update Nameserver Group request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Nameserver Group object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Nameserver group name","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver group description","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>nameservers</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Nameserver group
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Nameserver IP","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ns_type"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`udp`]"} schema={{"description":"Nameserver Type","type":"string","enum":["udp"]}}></SchemaItem><SchemaItem collapsible={false} name={"port"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Nameserver Port","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Nameserver group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"primary"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Nameserver group primary status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"domains"} required={true} schemaName={"string[]"} qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"} schema={{"description":"Nameserver group domain list","type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"nameservers\": [\n {\n \"ip\": \"string\",\n \"ns_type\": \"udp\",\n \"port\": 0\n }\n ],\n \"enabled\": true,\n \"groups\": [\n \"string\"\n ],\n \"primary\": true,\n \"domains\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
58
docs/api/update-a-peer.api.mdx
Normal file
58
docs/api/update-a-peer.api.mdx
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
id: update-a-peer
|
||||
title: "Update a Peer"
|
||||
description: "Update information about a peer"
|
||||
sidebar_label: "Update a Peer"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update information about a peer","tags":["Peers"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}],"requestBody":{"description":"update a peer","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"ssh_enabled":{"type":"boolean"},"login_expiration_enabled":{"type":"boolean"}},"required":["name","ssh_enabled","login_expiration_enabled"]}}}},"responses":{"200":{"description":"A Peer object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Peer ID","type":"string"},"name":{"description":"Peer's hostname","type":"string"}},"required":["id","name"],"title":"PeerMinimum"},{"type":"object","properties":{"ip":{"description":"Peer's IP address","type":"string"},"connected":{"description":"Peer to Management connection status","type":"boolean"},"last_seen":{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"},"os":{"description":"Peer's operating system and version","type":"string"},"version":{"description":"Peer's daemon or cli version","type":"string"},"groups":{"description":"Groups that the peer belongs to","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"ssh_enabled":{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"},"user_id":{"description":"User ID of the user that enrolled this peer","type":"string"},"hostname":{"description":"Hostname of the machine","type":"string"},"ui_version":{"description":"Peer's desktop UI version","type":"string"},"dns_label":{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"},"login_expiration_enabled":{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"},"login_expired":{"description":"Indicates whether peer's login expired or not","type":"boolean"},"last_login":{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}},"required":["ip","connected","last_seen","os","version","groups","ssh_enabled","hostname","dns_label","login_expiration_enabled","login_expired","last_login"]}],"title":"Peer"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/peers/{peerId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","ssh_enabled":true,"login_expiration_enabled":true},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Peer","description":{"content":"Update information about a peer","type":"text/plain"},"url":{"path":["api","peers",":peerId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a peer","type":"text/plain"},"type":"any","value":"","key":"peerId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Peer
|
||||
|
||||
|
||||
|
||||
Update information about a peer
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"peerId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a peer"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
update a peer
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ssh_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Peer object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's hostname","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ip"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's IP address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"connected"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Peer to Management connection status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_seen"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time peer connected to Netbird's management service","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"os"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's operating system and version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's daemon or cli version","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>groups</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Groups that the peer belongs to
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"ssh_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether SSH server is enabled on this peer","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"user_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID of the user that enrolled this peer","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"hostname"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Hostname of the machine","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"ui_version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's desktop UI version","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"dns_label"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer login expiration has been enabled or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"login_expired"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicates whether peer's login expired or not","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_login"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Last time this peer performed log in (authentication). E.g., user authenticated.","type":"string","format":"date-time"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ip\": \"string\",\n \"connected\": true,\n \"last_seen\": \"2023-04-26T12:12:56.625Z\",\n \"os\": \"string\",\n \"version\": \"string\",\n \"groups\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"ssh_enabled\": true,\n \"user_id\": \"string\",\n \"hostname\": \"string\",\n \"ui_version\": \"string\",\n \"dns_label\": \"string\",\n \"login_expiration_enabled\": true,\n \"login_expired\": true,\n \"last_login\": \"2023-04-26T12:12:56.625Z\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
78
docs/api/update-a-policy.api.mdx
Normal file
78
docs/api/update-a-policy.api.mdx
Normal file
File diff suppressed because one or more lines are too long
54
docs/api/update-a-route.api.mdx
Normal file
54
docs/api/update-a-route.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: update-a-route
|
||||
title: "Update a Route"
|
||||
description: "Update/Replace a Route"
|
||||
sidebar_label: "Update a Route"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update/Replace a Route","tags":["Routes"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}],"requestBody":{"description":"Update Route request","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}}}},"responses":{"200":{"description":"A Route object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Route Id","type":"string"},"network_type":{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}},"required":["id","network_type"]},{"type":"object","properties":{"description":{"description":"Route description","type":"string"},"network_id":{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1},"enabled":{"description":"Route status","type":"boolean"},"peer":{"description":"Peer Identifier associated with route","type":"string"},"network":{"description":"Network range in CIDR format","type":"string"},"metric":{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1},"masquerade":{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"},"groups":{"description":"Route group tag groups","type":"array","items":{"type":"string"}}},"required":["id","description","network_id","enabled","peer","network","metric","masquerade","groups"],"title":"RouteRequest"}],"title":"Route"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/routes/{routeId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"description":"string","network_id":"string","enabled":true,"peer":"string","network":"string","metric":0,"masquerade":true,"groups":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Route","description":{"content":"Update/Replace a Route","type":"text/plain"},"url":{"path":["api","routes",":routeId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a route","type":"text/plain"},"type":"any","value":"","key":"routeId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Route
|
||||
|
||||
|
||||
|
||||
Update/Replace a Route
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"routeId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a route"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
Update Route request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Route object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route Id","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network type indicating if it is IPv4 or IPv6","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Route description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network_id"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `non-empty` and `<= 40 characters`"} schema={{"description":"Route network identifier, to group HA routes","type":"string","maxLength":40,"minLength":1}}></SchemaItem><SchemaItem collapsible={false} name={"enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Route status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Peer Identifier associated with route","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"network"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Network range in CIDR format","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"metric"} required={true} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1` and `<= 9999`"} schema={{"description":"Route metric number. Lowest number has higher priority","type":"integer","maximum":9999,"minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"masquerade"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Indicate if peer should masquerade traffic to this route's prefix","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Route group tag groups","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"network_type\": \"string\",\n \"description\": \"string\",\n \"network_id\": \"string\",\n \"enabled\": true,\n \"peer\": \"string\",\n \"network\": \"string\",\n \"metric\": 0,\n \"masquerade\": true,\n \"groups\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
62
docs/api/update-a-rule.api.mdx
Normal file
62
docs/api/update-a-rule.api.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
id: update-a-rule
|
||||
title: "Update a Rule"
|
||||
description: "Update/Replace a Rule"
|
||||
sidebar_label: "Update a Rule"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update/Replace a Rule","tags":["Rules"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}],"requestBody":{"description":"Update Rule request","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"type":"array","items":{"type":"string"}},"destinations":{"type":"array","items":{"type":"string"}}}}]}}}},"responses":{"200":{"description":"A Rule object","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"description":"Rule ID","type":"string"}},"required":["id"]},{"type":"object","properties":{"name":{"description":"Rule name identifier","type":"string"},"description":{"description":"Rule friendly description","type":"string"},"disabled":{"description":"Rules status","type":"boolean"},"flow":{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}},"required":["name","description","disabled","flow"],"title":"RuleMinimum"},{"type":"object","properties":{"sources":{"description":"Rule source groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}},"destinations":{"description":"Rule destination groups","type":"array","items":{"type":"object","properties":{"id":{"description":"Group ID","type":"string"},"name":{"description":"Group Name identifier","type":"string"},"peers_count":{"description":"Count of peers associated to the group","type":"integer"}},"required":["id","name","peers_count"],"title":"GroupMinimum"}}},"required":["sources","destinations"]}],"title":"Rule"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/rules/{ruleId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","description":"string","disabled":true,"flow":"string","sources":["string"],"destinations":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Rule","description":{"content":"Update/Replace a Rule","type":"text/plain"},"url":{"path":["api","rules",":ruleId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a rule","type":"text/plain"},"type":"any","value":"","key":"ruleId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Rule
|
||||
|
||||
|
||||
|
||||
Update/Replace a Rule
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"ruleId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a rule"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
Update Rule request
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"sources"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"destinations"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Rule object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule friendly description","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"disabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Rules status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"flow"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>sources</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule source groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>destinations</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>
|
||||
|
||||
Rule destination groups
|
||||
|
||||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Group Name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"peers_count"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Count of peers associated to the group","type":"integer"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"disabled\": true,\n \"flow\": \"string\",\n \"sources\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ],\n \"destinations\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"peers_count\": 0\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/update-a-setup-key.api.mdx
Normal file
54
docs/api/update-a-setup-key.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: update-a-setup-key
|
||||
title: "Update a Setup Key"
|
||||
description: "Update information about a Setup Key"
|
||||
sidebar_label: "Update a Setup Key"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update information about a Setup Key","tags":["Setup Keys"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"keyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a setup key"}],"requestBody":{"description":"update to Setup Key","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Setup Key name","type":"string"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"expires_in":{"description":"Expiration time in seconds","type":"integer"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["name","type","expires_in","revoked","auto_groups","usage_limit"],"title":"SetupKeyRequest"}}}},"responses":{"200":{"description":"A Setup Key object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Setup Key ID","type":"string"},"key":{"description":"Setup Key value","type":"string"},"name":{"description":"Setup key name identifier","type":"string"},"expires":{"description":"Setup Key expiration date","type":"string","format":"date-time"},"type":{"description":"Setup key type, one-off for single time usage and reusable","type":"string"},"valid":{"description":"Setup key validity status","type":"boolean"},"revoked":{"description":"Setup key revocation status","type":"boolean"},"used_times":{"description":"Usage count of setup key","type":"integer"},"last_used":{"description":"Setup key last usage date","type":"string","format":"date-time"},"state":{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"},"auto_groups":{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}},"updated_at":{"description":"Setup key last update date","type":"string","format":"date-time"},"usage_limit":{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}},"required":["id","key","name","expires","type","valid","revoked","used_times","last_used","state","auto_groups","updated_at","usage_limit"],"title":"SetupKey"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/setup-keys/{keyId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"name":"string","type":"string","expires_in":0,"revoked":true,"auto_groups":["string"],"usage_limit":0},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a Setup Key","description":{"content":"Update information about a Setup Key","type":"text/plain"},"url":{"path":["api","setup-keys",":keyId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a setup key","type":"text/plain"},"type":"any","value":"","key":"keyId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a Setup Key
|
||||
|
||||
|
||||
|
||||
Update information about a Setup Key
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"keyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a setup key"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
update to Setup Key
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key name","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires_in"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Expiration time in seconds","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A Setup Key object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"key"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup Key value","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key name identifier","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"expires"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup Key expiration date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key type, one-off for single time usage and reusable","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"valid"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key validity status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"revoked"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Setup key revocation status","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"used_times"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Usage count of setup key","type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"last_used"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last usage date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\"","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Setup key groups to auto-assign to peers registered with this key","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"Setup key last update date","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"usage_limit"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"A number of times this key can be used. The value of 0 indicates the unlimited usage.","type":"integer"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"key\": \"string\",\n \"name\": \"string\",\n \"expires\": \"2023-04-26T12:12:56.628Z\",\n \"type\": \"string\",\n \"valid\": true,\n \"revoked\": true,\n \"used_times\": 0,\n \"last_used\": \"2023-04-26T12:12:56.628Z\",\n \"state\": \"string\",\n \"auto_groups\": [\n \"string\"\n ],\n \"updated_at\": \"2023-04-26T12:12:56.628Z\",\n \"usage_limit\": 0\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/update-account.api.mdx
Normal file
54
docs/api/update-account.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: update-account
|
||||
title: "Update an Account"
|
||||
description: "Update information about an account"
|
||||
sidebar_label: "Update an Account"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update information about an account","tags":["Accounts"],"operationId":"updateAccount","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"},"description":"The unique identifier of an account"}],"requestBody":{"description":"update an account","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"properties":{"peer_login_expiration_enabled":{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"},"peer_login_expiration":{"description":"Period of time after which peer login expires (seconds).","type":"integer"}},"required":["peer_login_expiration_enabled","peer_login_expiration"],"title":"AccountSettings"}},"required":["settings"]}}}},"responses":{"200":{"description":"An Account object","content":{"application/json":{"schema":{"properties":{"id":{"description":"Account ID","type":"string"},"settings":{"properties":{"peer_login_expiration_enabled":{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"},"peer_login_expiration":{"description":"Period of time after which peer login expires (seconds).","type":"integer"}},"required":["peer_login_expiration_enabled","peer_login_expiration"],"title":"AccountSettings"}},"required":["id","settings"],"title":"Account"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/accounts/{accountId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"settings":{"peer_login_expiration_enabled":true,"peer_login_expiration":0}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update an Account","description":{"content":"Update information about an account","type":"text/plain"},"url":{"path":["api","accounts",":accountId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of an account","type":"text/plain"},"type":"any","value":"","key":"accountId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update an Account
|
||||
|
||||
|
||||
|
||||
Update information about an account
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"accountId","required":true,"schema":{"type":"string"},"description":"The unique identifier of an account"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
update an account
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>settings</strong><span style={{"opacity":"0.6"}}> AccountSettings</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"peer_login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer_login_expiration"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Period of time after which peer login expires (seconds).","type":"integer"}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
An Account object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Account ID","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>settings</strong><span style={{"opacity":"0.6"}}> AccountSettings</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"peer_login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer_login_expiration"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Period of time after which peer login expires (seconds).","type":"integer"}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"settings\": {\n \"peer_login_expiration_enabled\": true,\n \"peer_login_expiration\": 0\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/update-dns-settings.api.mdx
Normal file
54
docs/api/update-dns-settings.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: update-dns-settings
|
||||
title: "Update DNS Settings"
|
||||
description: "Updates a DNS settings object"
|
||||
sidebar_label: "Update DNS Settings"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Updates a DNS settings object","tags":["DNS"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"A DNS settings object","content":{"application/json":{"schema":{"type":"object","properties":{"disabled_management_groups":{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}},"required":["disabled_management_groups"],"title":"DNSSettings"}}}},"responses":{"200":{"description":"A JSON Object of DNS Setting","content":{"application/json":{"schema":{"type":"object","properties":{"disabled_management_groups":{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}},"required":["disabled_management_groups"],"title":"DNSSettings"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/dns/settings","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"disabled_management_groups":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update DNS Settings","description":{"content":"Updates a DNS settings object","type":"text/plain"},"url":{"path":["api","dns","settings"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update DNS Settings
|
||||
|
||||
|
||||
|
||||
Updates a DNS settings object
|
||||
|
||||
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
A DNS settings object
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"disabled_management_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A JSON Object of DNS Setting
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"disabled_management_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups whose DNS management is disabled","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"disabled_management_groups\": [\n \"string\"\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
54
docs/api/update-user.api.mdx
Normal file
54
docs/api/update-user.api.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: update-user
|
||||
title: "Update a User"
|
||||
description: "Update information about a User"
|
||||
sidebar_label: "Update a User"
|
||||
hide_title: true
|
||||
hide_table_of_contents: true
|
||||
api: {"description":"Update information about a User","tags":["Users"],"operationId":"updateUser","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}],"requestBody":{"description":"User update","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"description":"User's NetBird account role","type":"string"},"auto_groups":{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}},"required":["role","auto_groups"],"title":"UserRequest"}}}},"responses":{"200":{"description":"A User object","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"User ID","type":"string"},"email":{"description":"User's email address","type":"string"},"name":{"description":"User's name from idp provider","type":"string"},"role":{"description":"User's NetBird account role","type":"string"},"status":{"description":"User's status","type":"string","enum":["active","invited","disabled"]},"auto_groups":{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}},"is_current":{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true},"is_service_user":{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}},"required":["id","email","name","role","auto_groups","status"],"title":"User"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/users/{userId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"role":"string","auto_groups":["string"]},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update a User","description":{"content":"Update information about a User","type":"text/plain"},"url":{"path":["api","users",":userId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
|
||||
sidebar_class_name: "put api-method"
|
||||
info_path: api/netbird-rest-api
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
import ApiTabs from "@theme/ApiTabs";
|
||||
import MimeTabs from "@theme/MimeTabs";
|
||||
import ParamsItem from "@theme/ParamsItem";
|
||||
import ResponseSamples from "@theme/ResponseSamples";
|
||||
import SchemaItem from "@theme/SchemaItem";
|
||||
import SchemaTabs from "@theme/SchemaTabs";
|
||||
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## Update a User
|
||||
|
||||
|
||||
|
||||
Update information about a User
|
||||
|
||||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>
|
||||
|
||||
User update
|
||||
|
||||
</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"role"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's NetBird account role","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
|
||||
|
||||
A User object
|
||||
|
||||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's email address","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's name from idp provider","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"role"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"User's NetBird account role","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`active`, `invited`, `disabled`]"} schema={{"description":"User's status","type":"string","enum":["active","invited","disabled"]}}></SchemaItem><SchemaItem collapsible={false} name={"auto_groups"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"description":"Groups to auto-assign to peers registered by this user","type":"array","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"is_current"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if authenticated user is the same as this user","type":"boolean","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"is_service_user"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Is true if this user is a service user","type":"boolean","readOnly":true}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"email\": \"string\",\n \"name\": \"string\",\n \"role\": \"string\",\n \"status\": \"active\",\n \"auto_groups\": [\n \"string\"\n ],\n \"is_current\": true,\n \"is_service_user\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
|
||||
|
||||
Bad Request
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>
|
||||
|
||||
Requires authentication
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>
|
||||
|
||||
Forbidden
|
||||
|
||||
</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>
|
||||
|
||||
Internal Server Error
|
||||
|
||||
</div><div></div></TabItem></ApiTabs></div>
|
||||
|
||||
@@ -28,7 +28,7 @@ To achieve this, NetBird client applications employ signalling servers to find o
|
||||
These are similar to the signaling servers used in [WebRTC](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling#the_signaling_server)
|
||||
|
||||
Thanks to [NAT traversal techniques](https://en.wikipedia.org/wiki/NAT_traversal),
|
||||
outlined in the [Why Wireguard with NetBird](/wireguard-plus-netbird) section,
|
||||
outlined in the [Why Wireguard with NetBird](/docs/documentation/wireguard-plus-netbird.md) section,
|
||||
NetBird installation doesn't require complex network and firewall configuration.
|
||||
It just works, minimising the maintenance effort.
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Architecture
|
||||
|
||||
@@ -18,12 +18,15 @@ const config = {
|
||||
|
||||
presets: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
'classic',
|
||||
({
|
||||
docs: {
|
||||
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
routeBasePath: '/',
|
||||
editUrl: 'https://github.com/netbirdio/docs/tree/main',
|
||||
docLayoutComponent: "@theme/DocPage",
|
||||
docItemComponent: "@theme/ApiItem"
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
@@ -36,6 +39,29 @@ const config = {
|
||||
],
|
||||
],
|
||||
|
||||
plugins: [
|
||||
[
|
||||
'docusaurus-plugin-openapi-docs',
|
||||
{
|
||||
id: "apiDocs",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
api: {
|
||||
// specPath: "petstore.yaml",
|
||||
specPath: "openapi.yml",
|
||||
// specPath: "https://raw.githubusercontent.com/netbirdio/netbird/main/management/server/http/api/openapi.yml", // Path to designated spec file
|
||||
outputDir: "docs/api", // Output directory for generated .mdx docs
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "none",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
],
|
||||
themes: ["docusaurus-theme-openapi-docs"], // Allows use of @theme/ApiItem and other components
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
@@ -56,10 +82,17 @@ const config = {
|
||||
}, // or position: 'right'
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'introduction',
|
||||
docId: 'documentation/introduction',
|
||||
position: 'right',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'api/netbird-rest-api',
|
||||
// docId: 'api/add-pet',
|
||||
position: 'right',
|
||||
label: 'API',
|
||||
},
|
||||
{
|
||||
to: 'https://netbird.io/blog/',
|
||||
label: 'Blog',
|
||||
@@ -85,6 +118,11 @@ const config = {
|
||||
textColor: '#091E42',
|
||||
isCloseable: true,
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
autoCollapseCategories: true
|
||||
},
|
||||
}
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
2129
openapi.yml
Normal file
2129
openapi.yml
Normal file
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -5,6 +5,7 @@
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus serve",
|
||||
"generate-api": "docusaurus clean-api-docs api && docusaurus gen-api-docs api",
|
||||
"dev": "docusaurus start --host 0.0.0.0",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
@@ -15,12 +16,16 @@
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.20",
|
||||
"@docusaurus/plugin-google-analytics": "^2.0.0-beta.21",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.20",
|
||||
"@docusaurus/core": "2.2.0",
|
||||
"@docusaurus/plugin-content-docs": "2.2.0",
|
||||
"@docusaurus/plugin-google-analytics": "2.2.0",
|
||||
"@docusaurus/preset-classic": "2.2.0",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"clsx": "^1.1.1",
|
||||
"docusaurus-plugin-openapi-docs": "1.7.2",
|
||||
"docusaurus-theme-openapi-docs": "1.7.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"prism-react-renderer": "^1.2.1",
|
||||
"react": "^17.0.1",
|
||||
|
||||
1209
petstore.yaml
Normal file
1209
petstore.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,8 @@
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
docs: [{type: 'autogenerated', dirName: 'documentation'}],
|
||||
api: require("./docs/api/sidebar.js")
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user