log-manager/public/swagger/swagger.json

138 lines
3.0 KiB
JSON

{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0",
"info": {
"title": "JNX Log Manager API Documentation.",
"version": "1.0.0"
},
"host": "jannex",
"basePath": "/v1",
"paths": {
"/v1/log": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"log"
],
"summary": "Add a log to the log file. You can specify multiple logs at once",
"operationId": "addLog",
"parameters": [
{
"description": "The log to add",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LogBody"
}
}
],
"responses": {
"200": {
"description": "Successfully added log"
},
"400": {
"description": "Invalid request body"
}
}
}
},
"/v1/log/types": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"log"
],
"summary": "Get the available log types",
"operationId": "getAvailableLogTypes",
"responses": {
"200": {
"description": "Successfully got log types. Returns an array of strings"
}
}
}
},
"/v1/logs/{type}": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"logs"
],
"summary": "Get the log file for the specified type",
"operationId": "getLog",
"parameters": [
{
"type": "string",
"description": "The type of log to get",
"name": "type",
"in": "path",
"required": true
},
{
"type": "string",
"description": "The date of the log to get",
"name": "d",
"in": "query"
},
{
"type": "string",
"description": "The filter to apply to the log",
"name": "f",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successfully got log. Returns an array of strings"
},
"400": {
"description": "Invalid request body"
},
"422": {
"description": "No log file found for the specified type or date"
}
}
}
}
},
"definitions": {
"LogBody": {
"type": "object",
"properties": {
"Logs": {
"type": "array",
"items": {
"type": "string"
}
},
"Type": {
"type": "string"
}
},
"x-go-package": "jannex/log-manager/modules/structs"
}
}
}