{ "openapi": "3.0.1", "info": { "title": "headscale/v1/headscale.proto", "version": "version not set" }, "servers": [ { "url": "/" } ], "tags": [ { "name": "HeadscaleService" } ], "paths": { "/api/v1/apikey": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ListApiKeys", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListApiKeysResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } }, "post": { "tags": [ "HeadscaleService" ], "summary": "--- ApiKeys start ---", "operationId": "HeadscaleService_CreateApiKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreateApiKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreateApiKeyResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/apikey/expire": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ExpireApiKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ExpireApiKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ExpireApiKeyResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/apikey/{prefix}": { "delete": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_DeleteApiKey", "parameters": [ { "name": "prefix", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DeleteApiKeyResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/debug/node": { "post": { "tags": [ "HeadscaleService" ], "summary": "--- Node start ---", "operationId": "HeadscaleService_DebugCreateNode", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DebugCreateNodeRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DebugCreateNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/node": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ListNodes", "parameters": [ { "name": "user", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListNodesResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/backfillips": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_BackfillNodeIPs", "parameters": [ { "name": "confirmed", "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1BackfillNodeIPsResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/register": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_RegisterNode", "parameters": [ { "name": "user", "in": "query", "schema": { "type": "string" } }, { "name": "key", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1RegisterNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/{nodeId}": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_GetNode", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1GetNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } }, "delete": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_DeleteNode", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DeleteNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/{nodeId}/expire": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ExpireNode", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ExpireNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/{nodeId}/rename/{newName}": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_RenameNode", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } }, { "name": "newName", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1RenameNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/{nodeId}/routes": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_GetNodeRoutes", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1GetNodeRoutesResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/node/{nodeId}/tags": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_SetTags", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HeadscaleServiceSetTagsBody" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1SetTagsResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/node/{nodeId}/user": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_MoveNode", "parameters": [ { "name": "nodeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } }, { "name": "user", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1MoveNodeResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/preauthkey": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ListPreAuthKeys", "parameters": [ { "name": "user", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListPreAuthKeysResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } }, "post": { "tags": [ "HeadscaleService" ], "summary": "--- PreAuthKeys start ---", "operationId": "HeadscaleService_CreatePreAuthKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreatePreAuthKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreatePreAuthKeyResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/preauthkey/expire": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ExpirePreAuthKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ExpirePreAuthKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ExpirePreAuthKeyResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/routes": { "get": { "tags": [ "HeadscaleService" ], "summary": "--- Route start ---", "operationId": "HeadscaleService_GetRoutes", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1GetRoutesResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/routes/{routeId}": { "delete": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_DeleteRoute", "parameters": [ { "name": "routeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DeleteRouteResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/routes/{routeId}/disable": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_DisableRoute", "parameters": [ { "name": "routeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DisableRouteResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/routes/{routeId}/enable": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_EnableRoute", "parameters": [ { "name": "routeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uint64" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1EnableRouteResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/user": { "get": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_ListUsers", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListUsersResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } }, "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_CreateUser", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1CreateUserResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } }, "x-codegen-request-body-name": "body" } }, "/api/v1/user/{name}": { "get": { "tags": [ "HeadscaleService" ], "summary": "--- User start ---", "operationId": "HeadscaleService_GetUser", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1GetUserResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } }, "delete": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_DeleteUser", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1DeleteUserResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } }, "/api/v1/user/{oldName}/rename/{newName}": { "post": { "tags": [ "HeadscaleService" ], "operationId": "HeadscaleService_RenameUser", "parameters": [ { "name": "oldName", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "newName", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1RenameUserResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/rpcStatus" } } } } } } } }, "components": { "schemas": { "HeadscaleServiceSetTagsBody": { "type": "object", "properties": { "tags": { "type": "array", "items": { "type": "string" } } } }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": { "type": "object" } }, "rpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/protobufAny" } } } }, "v1ApiKey": { "type": "object", "properties": { "id": { "type": "string", "format": "uint64" }, "prefix": { "type": "string" }, "expiration": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "lastSeen": { "type": "string", "format": "date-time" } } }, "v1BackfillNodeIPsResponse": { "type": "object", "properties": { "changes": { "type": "array", "items": { "type": "string" } } } }, "v1CreateApiKeyRequest": { "type": "object", "properties": { "expiration": { "type": "string", "format": "date-time" } } }, "v1CreateApiKeyResponse": { "type": "object", "properties": { "apiKey": { "type": "string" } } }, "v1CreatePreAuthKeyRequest": { "type": "object", "properties": { "user": { "type": "string" }, "reusable": { "type": "boolean" }, "ephemeral": { "type": "boolean" }, "expiration": { "type": "string", "format": "date-time" }, "aclTags": { "type": "array", "items": { "type": "string" } } } }, "v1CreatePreAuthKeyResponse": { "type": "object", "properties": { "preAuthKey": { "$ref": "#/components/schemas/v1PreAuthKey" } } }, "v1CreateUserRequest": { "type": "object", "properties": { "name": { "type": "string" } } }, "v1CreateUserResponse": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/v1User" } } }, "v1DebugCreateNodeRequest": { "type": "object", "properties": { "user": { "type": "string" }, "key": { "type": "string" }, "name": { "type": "string" }, "routes": { "type": "array", "items": { "type": "string" } } } }, "v1DebugCreateNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1DeleteApiKeyResponse": { "type": "object" }, "v1DeleteNodeResponse": { "type": "object" }, "v1DeleteRouteResponse": { "type": "object" }, "v1DeleteUserResponse": { "type": "object" }, "v1DisableRouteResponse": { "type": "object" }, "v1EnableRouteResponse": { "type": "object" }, "v1ExpireApiKeyRequest": { "type": "object", "properties": { "prefix": { "type": "string" } } }, "v1ExpireApiKeyResponse": { "type": "object" }, "v1ExpireNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1ExpirePreAuthKeyRequest": { "type": "object", "properties": { "user": { "type": "string" }, "key": { "type": "string" } } }, "v1ExpirePreAuthKeyResponse": { "type": "object" }, "v1GetNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1GetNodeRoutesResponse": { "type": "object", "properties": { "routes": { "type": "array", "items": { "$ref": "#/components/schemas/v1Route" } } } }, "v1GetRoutesResponse": { "type": "object", "properties": { "routes": { "type": "array", "items": { "$ref": "#/components/schemas/v1Route" } } } }, "v1GetUserResponse": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/v1User" } } }, "v1ListApiKeysResponse": { "type": "object", "properties": { "apiKeys": { "type": "array", "items": { "$ref": "#/components/schemas/v1ApiKey" } } } }, "v1ListNodesResponse": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/components/schemas/v1Node" } } } }, "v1ListPreAuthKeysResponse": { "type": "object", "properties": { "preAuthKeys": { "type": "array", "items": { "$ref": "#/components/schemas/v1PreAuthKey" } } } }, "v1ListUsersResponse": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/v1User" } } } }, "v1MoveNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1Node": { "type": "object", "properties": { "id": { "type": "string", "format": "uint64" }, "machineKey": { "type": "string" }, "nodeKey": { "type": "string" }, "discoKey": { "type": "string" }, "ipAddresses": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "user": { "$ref": "#/components/schemas/v1User" }, "lastSeen": { "type": "string", "format": "date-time" }, "expiry": { "type": "string", "format": "date-time" }, "preAuthKey": { "$ref": "#/components/schemas/v1PreAuthKey" }, "createdAt": { "type": "string", "format": "date-time" }, "registerMethod": { "$ref": "#/components/schemas/v1RegisterMethod" }, "forcedTags": { "type": "array", "items": { "type": "string" } }, "invalidTags": { "type": "array", "items": { "type": "string" } }, "validTags": { "type": "array", "items": { "type": "string" } }, "givenName": { "type": "string" }, "online": { "type": "boolean" } } }, "v1PreAuthKey": { "type": "object", "properties": { "user": { "type": "string" }, "id": { "type": "string" }, "key": { "type": "string" }, "reusable": { "type": "boolean" }, "ephemeral": { "type": "boolean" }, "used": { "type": "boolean" }, "expiration": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "aclTags": { "type": "array", "items": { "type": "string" } } } }, "v1RegisterMethod": { "type": "string", "default": "REGISTER_METHOD_UNSPECIFIED", "enum": [ "REGISTER_METHOD_UNSPECIFIED", "REGISTER_METHOD_AUTH_KEY", "REGISTER_METHOD_CLI", "REGISTER_METHOD_OIDC" ] }, "v1RegisterNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1RenameNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1RenameUserResponse": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/v1User" } } }, "v1Route": { "type": "object", "properties": { "id": { "type": "string", "format": "uint64" }, "node": { "$ref": "#/components/schemas/v1Node" }, "prefix": { "type": "string" }, "advertised": { "type": "boolean" }, "enabled": { "type": "boolean" }, "isPrimary": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "deletedAt": { "type": "string", "format": "date-time" } } }, "v1SetTagsResponse": { "type": "object", "properties": { "node": { "$ref": "#/components/schemas/v1Node" } } }, "v1User": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" } } } } }, "x-original-swagger-version": "2.0" }