{ "openapi": "3.0.0", "info": { "title": "AMP API Stats Wrapper", "description": "A simple wrapper built on the AMP API to expose API endpoints that return status responses", "version": "1.1.0" }, "servers": [ { "url": "/", "description": "AMP API Stats Wrapper" } ], "paths": { "/target/status/{TargetName}": { "get": { "summary": "Get the status of a target", "description": "Get the status of a target", "parameters": [ { "name": "TargetName", "in": "path", "description": "The name of the target", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The status of the target", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APICoreGetStatus" } } } }, "404": { "description": "Target not found" } } } }, "/instance/status/simple/{InstanceName}": { "get": { "summary": "Get the simple status of an instance", "description": "Get the simple status of an instance", "parameters": [ { "name": "InstanceName", "in": "path", "description": "The name of the instance", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The status of the instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleInstanceStatus" } } } }, "404": { "description": "Instance not found" } } } }, "/server/status/{InstanceName}": { "get": { "summary": "Get the status of a server", "description": "Get the status of a server", "parameters": [ { "name": "InstanceName", "in": "path", "description": "The name of the instance", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The status of the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APICoreGetStatus" } } } }, "404": { "description": "Server not found" } } } }, "/server/status/simple/{InstanceName}": { "get": { "summary": "Get the simple status of a server", "description": "Get the simple status of a server", "parameters": [ { "name": "InstanceName", "in": "path", "description": "The name of the instance", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The status of the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIStateEnum" } } } }, "404": { "description": "Server not found" } } } } }, "components": { "schemas": { "APICoreGetStatus": { "type": "object", "properties": { "State": { "$ref": "#/components/schemas/APIState" }, "Uptime": { "type": "string" }, "Metrics": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/APIMetric" } } } }, "SimpleInstanceStatus": { "type": "string", "enum": [ "Running", "Offline" ] }, "APIState": { "type": "integer", "enum": [ -1, 0, 5, 7, 10, 20, 30, 40, 45, 50, 60, 70, 75, 80, 100, 200, 250, 999 ] }, "APIStateEnum": { "type": "string", "enum": [ "Undefined", "Stopped", "PreStart", "Configuring", "Starting", "Ready", "Restarting", "Stopping", "PreparingForSleep", "Sleeping", "Waiting", "Installing", "Updating", "AwaitingUserInput", "Failed", "Suspended", "Maintainence", "Indeterminate" ] }, "APIMetric": { "type": "object", "properties": { "RawValue": { "type": "integer" }, "MaxValue": { "type": "integer" }, "Percent": { "type": "number" }, "Units": { "type": "string" }, "Color": { "type": "string" }, "Color2": { "type": "string" }, "Color3": { "type": "string" } } } } } }