{ "swagger": "2.0", "info": { "description": "A node status API that holds uptime information for Nym nodes.", "title": "Nym Node Status API", "termsOfService": "http://swagger.io/terms/", "contact": {}, "license": { "name": "Apache 2.0", "url": "https://github.com/nymtech/node-status-api/license" }, "version": "0.10.0" }, "paths": { "/api/status/fullgatewayreport": { "get": { "description": "Provides summary uptime statistics for last 5 minutes, day, week, and month", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Retrieves a summary report of historical gateway status", "operationId": "batchGetGatewayStatusReport", "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/fullmixreport": { "get": { "description": "Provides summary uptime statistics for last 5 minutes, day, week, and month", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Retrieves a summary report of historical mix status", "operationId": "batchGetMixStatusReport", "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/gateway": { "post": { "description": "Nym network monitor sends packets through the system and checks if they make it. The network monitor then hits this method to report whether the node was up at a given time.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lets the network monitor create a new uptime status for a gateway", "operationId": "addGatewayStatus", "parameters": [ { "description": "object", "name": "object", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.GatewayStatus" } } ], "responses": { "201": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/gateway/batch": { "post": { "description": "Nym network monitor sends packets through the system and checks if they make it. The network monitor then hits this method to report whether nodes were up at a given time.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lets the network monitor create a new uptime status for multiple gateways", "operationId": "batchCreateGatewayStatus", "parameters": [ { "description": "object", "name": "object", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.BatchGatewayStatus" } } ], "responses": { "201": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/gateway/{pubkey}/history": { "get": { "description": "Lists all gateway statuses for a given node pubkey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lists mixnode activity", "operationId": "listGatewayStatuses", "parameters": [ { "type": "string", "description": "Gateway Pubkey", "name": "pubkey", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.GatewayStatus" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/gateway/{pubkey}/report": { "get": { "description": "Provides summary uptime statistics for last 5 minutes, day, week, and month", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Retrieves a summary report of historical gateway status", "operationId": "getGatewayStatusReport", "parameters": [ { "type": "string", "description": "Gateway Pubkey", "name": "pubkey", "in": "path", "required": true } ], "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/mixnode": { "post": { "description": "Nym network monitor sends packets through the system and checks if they make it. The network monitor then hits this method to report whether the node was up at a given time.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lets the network monitor create a new uptime status for a mix", "operationId": "addMixStatus", "parameters": [ { "description": "object", "name": "object", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.MixStatus" } } ], "responses": { "201": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/mixnode/batch": { "post": { "description": "Nym network monitor sends packets through the system and checks if they make it. The network monitor then hits this method to report whether nodes were up at a given time.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lets the network monitor create a new uptime status for multiple mixes", "operationId": "batchCreateMixStatus", "parameters": [ { "description": "object", "name": "object", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.BatchMixStatus" } } ], "responses": { "201": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/mixnode/{pubkey}/history": { "get": { "description": "Lists all mixnode statuses for a given node pubkey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Lists mixnode activity", "operationId": "listMixStatuses", "parameters": [ { "type": "string", "description": "Mixnode Pubkey", "name": "pubkey", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.MixStatus" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } }, "/api/status/mixnode/{pubkey}/report": { "get": { "description": "Provides summary uptime statistics for last 5 minutes, day, week, and month", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "status" ], "summary": "Retrieves a summary report of historical mix status", "operationId": "getMixStatusReport", "parameters": [ { "type": "string", "description": "Mixnode Pubkey", "name": "pubkey", "in": "path", "required": true } ], "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/models.Error" } } } } } }, "definitions": { "models.BatchGatewayStatus": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "array", "items": { "$ref": "#/definitions/models.GatewayStatus" } } } }, "models.BatchMixStatus": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "array", "items": { "$ref": "#/definitions/models.MixStatus" } } } }, "models.Error": { "type": "object", "properties": { "error": { "type": "string" } } }, "models.GatewayStatus": { "type": "object", "required": [ "ipVersion", "owner", "pubKey", "up" ], "properties": { "ipVersion": { "type": "string" }, "owner": { "type": "string" }, "pubKey": { "type": "string" }, "up": { "type": "boolean" } } }, "models.MixStatus": { "type": "object", "required": [ "ipVersion", "owner", "pubKey", "up" ], "properties": { "ipVersion": { "type": "string" }, "owner": { "type": "string" }, "pubKey": { "type": "string" }, "up": { "type": "boolean" } } } } }