--- id: retrieve-a-setup-key title: "Retrieve a Setup Key" description: "Get information about a Setup Key" sidebar_label: "Retrieve a Setup Key" hide_title: true hide_table_of_contents: true api: {"description":"Get information about a Setup Key","tags":["Setup Keys"],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"keyId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a setup key"}],"responses":{"200":{"description":"A Setup Key object","content":{"application/json":{"schema":{"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/{keyId}","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 a Setup Key","description":{"content":"Get information about a Setup Key","type":"text/plain"},"url":{"path":["api","setup-keys",":keyId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a setup key","type":"text/plain"},"type":"any","value":"","key":"keyId"}]},"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 a Setup Key Get information about a Setup Key
Path Parameters
A Setup Key object
Schema
Bad Request
Requires authentication
Forbidden
Internal Server Error