mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-17 16:06:36 +00:00
54 lines
5.6 KiB
Plaintext
54 lines
5.6 KiB
Plaintext
---
|
|
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>
|
|
|