1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
juanfont.headscale/gen/openapiv2/headscale/v1/headscale.swagger.json
2021-10-30 14:29:41 +00:00

251 lines
5.5 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "headscale/v1/headscale.proto",
"version": "version not set"
},
"tags": [
{
"name": "HeadscaleService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/api/v1/machine/{machineId}": {
"get": {
"operationId": "HeadscaleService_GetMachine",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetMachineResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "machineId",
"in": "path",
"required": true,
"type": "string",
"format": "uint64"
}
],
"tags": [
"HeadscaleService"
]
}
},
"/api/v1/namespace": {
"get": {
"operationId": "HeadscaleService_ListNamespaces",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ListNamespacesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"HeadscaleService"
]
},
"delete": {
"operationId": "HeadscaleService_DeleteNamespace",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1DeleteNamespaceResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "name",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"HeadscaleService"
]
},
"post": {
"operationId": "HeadscaleService_CreateNamespace",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1CreateNamespaceResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1CreateNamespaceRequest"
}
}
],
"tags": [
"HeadscaleService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1CreateNamespaceRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"v1CreateNamespaceResponse": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"v1DeleteNamespaceResponse": {
"type": "object"
},
"v1GetMachineResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uint64"
},
"machineKey": {
"type": "string"
},
"nodeKey": {
"type": "string"
},
"discoKey": {
"type": "string"
},
"ipAddress": {
"type": "string"
},
"name": {
"type": "string"
},
"namespaceId": {
"type": "integer",
"format": "int64"
},
"registered": {
"type": "boolean"
},
"registerMethod": {
"$ref": "#/definitions/v1RegisterMethod"
},
"authKeyId": {
"type": "integer",
"format": "int64"
},
"lastSeen": {
"type": "string",
"format": "date-time"
},
"lastSuccessfulUpdate": {
"type": "string",
"format": "date-time"
},
"expiry": {
"type": "string",
"format": "date-time"
}
}
},
"v1ListNamespacesResponse": {
"type": "object",
"properties": {
"namespaces": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1RegisterMethod": {
"type": "string",
"enum": [
"REGISTER_METHOD_UNSPECIFIED",
"REGISTER_METHOD_AUTH_KEY",
"REGISTER_METHOD_CLI",
"REGISTER_METHOD_OIDC"
],
"default": "REGISTER_METHOD_UNSPECIFIED"
}
}
}