--- 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":"","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
Path Parameters
Request Body
update a peer
A Peer object
Schema
    groups object[] required
    Groups that the peer belongs to
  • Array [
  • ]
Bad Request
Requires authentication
Forbidden
Internal Server Error