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