{ "swagger": "2.0", "info": { "title": "route.proto", "version": "version not set" }, "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/v1/hosts/create": { "post": { "operationId": "AddHost", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/AddHostResponse" } } }, "tags": [ "Hosts" ] } }, "/v1/hosts/{host}": { "get": { "operationId": "GetHost", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/GetHostResponse" } } }, "parameters": [ { "name": "host", "in": "path", "required": true, "type": "string" }, { "name": "base.token", "in": "query", "required": false, "type": "string" }, { "name": "onionHost", "in": "query", "required": false, "type": "string" }, { "name": "id", "in": "query", "required": false, "type": "string" } ], "tags": [ "Hosts" ] }, "delete": { "operationId": "RemoveHost", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/RemoveHostResponse" } } }, "parameters": [ { "name": "host", "in": "path", "required": true, "type": "string" } ], "tags": [ "Hosts" ] } }, "/v1/tokens/createInitialToken": { "post": { "operationId": "CreateInitialToken", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/CreateInitialTokenResponse" } } }, "tags": [ "Tokens" ] } }, "/v1/users/login": { "post": { "operationId": "Login", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/LoginResponse" } } }, "tags": [ "Users" ] } } }, "definitions": { "AddHostRequest": { "type": "object", "properties": { "base": { "$ref": "#/definitions/BaseAPICall" }, "hostname": { "type": "string" }, "onionKey": { "type": "string", "format": "byte" } } }, "AddHostResponse": { "type": "object", "properties": { "id": { "type": "string" }, "token": { "type": "string" }, "hostname": { "type": "string" }, "onionHostname": { "type": "string" } } }, "BaseAPICall": { "type": "object", "properties": { "token": { "type": "string" } } }, "CreateInitialTokenRequest": { "type": "object", "properties": { "username": { "type": "string" } } }, "CreateInitialTokenResponse": { "type": "object", "properties": { "token": { "type": "string" }, "tokenid": { "type": "string" } } }, "GetHostRequest": { "type": "object", "properties": { "base": { "$ref": "#/definitions/BaseAPICall" }, "host": { "type": "string" }, "onionHost": { "type": "string" }, "id": { "type": "string" } } }, "GetHostResponse": { "type": "object", "properties": { "host": { "$ref": "#/definitions/Host" } } }, "Host": { "type": "object", "properties": { "id": { "type": "string" }, "hostname": { "type": "string" }, "onionHostname": { "type": "string" }, "token": { "type": "string" }, "onionKey": { "type": "string", "format": "byte" }, "kind": { "type": "integer", "format": "int32" }, "port": { "type": "string" } } }, "LoginRequest": { "type": "object", "properties": { "oauth2provider": { "type": "string" } } }, "LoginResponse": { "type": "object", "properties": { "token": { "type": "string" }, "uid": { "type": "string" } } }, "RemoveHostRequest": { "type": "object", "properties": { "base": { "$ref": "#/definitions/BaseAPICall" }, "host": { "type": "string" } } }, "RemoveHostResponse": { "type": "object", "properties": { "success": { "type": "boolean", "format": "boolean" } } } } }