mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-19 08:56:35 +00:00
50 lines
5.4 KiB
Plaintext
50 lines
5.4 KiB
Plaintext
---
|
|
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>
|
|
|