--- 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":"","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
Query Parameters
A JSON array of Users
Schema
  • Array [
  • ]
Bad Request
Requires authentication
Forbidden
Internal Server Error