Paste your logs.

Built for Minecraft & Hytale

API Documentation

Integrate mclo.gs directly into your server panel, your hosting software or anything else. This platform was built for high performance automation and can easily be integrated into any existing software via our HTTP API.

Quick Links

Create a log

POST https://api.mclo.gs/1/log application/json
Posting content with the content type application/x-www-form-urlencoded is still supported for backwards compatibility, but does not support setting metadata.
Field Required Type Description
content string The raw log file content as string. Limited to 10.00 MiB and 25,000 lines. Will be truncated if possible and necessary, but truncating on the client side is recommended.
source string The name of the source, e.g. a domain or software name.
metadata array An array of metadata entries.

Example body application/json

{
    "content": "[log file content...]",
    "source": "example.org"
}

Metadata

You can send metadata alongside the log content to be displayed on the log page and/or be read by other applications through this API. This is entirely optional, but can help to provide additional context, e.g. internal server IDs, software versions etc.

A metadata entry is an object with the following fields:

Field Required Type Description
key string The metadata key. Can be used to identify the entry in your code later.
value string|int|float|bool|null The metadata value.
label string The display label. If not provided, the key will be used as label.
visible bool Whether this metadata should be visible on the log page or is only available through the API. Default is true.

Example body with metadata application/json

{
    "content": "[log file content...]",
    "source": "example.org",
    "metadata": [
        {
            "key": "server_id",
            "value": 12345,
            "visible": false
        },
        {
            "key": "software_version",
            "value": "1.2.3",
            "label": "Software Version",
            "visible": true
        }
    ]
}

Responses

Success application/json

The token provided in this response can be used to delete this log later. Store or discard it securely, it will not be shown again.
{
    "success":true,
    "id":"WnMMikq",
    "source":null,
    "created":1769597979,
    "expires":1777373979,
    "size":157369,
    "lines":1201,
    "errors":8,
    "url": "https://mclo.gs/WnMMikq",
    "raw": "https://api.mclo.gs/1/raw/WnMMikq",
    "token":"78351fafe495398163fff847f9a26dda440435dcf7b5f92e8e36308f3683d771",
    "metadata": [
        {
            "key": "server_id",
            "value": 12345,
            "visible": false
        },
        {
            "key": "software_version",
            "value": "1.2.3",
            "label": "Software Version",
            "visible": true
        }
    ]
}

Error application/json

{
    "success": false,
    "error": "Required field 'content' not found."
}

Get log info and content

GET https://api.mclo.gs/1/log/[id]

This endpoint only returns the log info and metadata by default (same response as creating a log), you can also get the content in the same request by enabling it in different formats using GET parameters. You can combine multiple parameters to get multiple content formats in one request, but keep in mind that this will increase the response size.

GET Parameter Response field Description
raw content.raw Includes the raw log content as string in the response.
parsed content.parsed Includes the parsed log content as array/objects in the response.
insights content.insights Includes the automatically detected insights in the response.

Responses

Success application/json

All content fields are only included if the corresponding GET parameter is provided. If no content parameter is provided, the entire content object is omitted from the response.
{
    "success":true,
    "id":"WnMMikq",
    "source":null,
    "created":1769597979,
    "expires":1777373979,
    "size":157369,
    "lines":1201,
    "errors":8,
    "url": "https://mclo.gs/WnMMikq",
    "raw": "https://api.mclo.gs/1/raw/WnMMikq",
    "metadata": [
        {
            "key": "server_id",
            "value": 12345,
            "visible": false
        },
        {
            "key": "software_version",
            "value": "1.2.3",
            "label": "Software Version",
            "visible": true
        }
    ],
    "content": {
        "raw": "[log file content...]",
        "parsed": [ /* parsed log entries */ ],
        "insights": { "problems": [ /* detected problems */ ], "information": [ /* detected information */ ] }
    }
}

Error application/json

{
    "success": false,
    "error": "Log not found."
}

Delete a log

Deleting a log requires the token that was provided when creating the log.
DELETE https://api.mclo.gs/1/log/[id]

Headers

Header Example Description
Authorization Authorization: Bearer 78351fafe495398163f... The type (always "Bearer") and the log token received when creating the log.

Responses

Success application/json

{
    "success": true
}

Error application/json

{
    "success": false,
    "error": "Invalid token."
}

Get the raw log file content

Only use this endpoint if you really only need the raw log content. For most use cases, getting the log info and content together from the log endpoint is recommended.
GET https://api.mclo.gs/1/raw/[id]
Field Type Description
[id] string The log file id, received from the paste endpoint or from a URL (https://mclo.gs/[id]).

Success text/plain

[18:25:33] [Server thread/INFO]: Starting minecraft server version 1.16.2
[18:25:33] [Server thread/INFO]: Loading properties
[18:25:34] [Server thread/INFO]: Default game type: SURVIVAL
...

Error application/json

{
    "success": false,
    "error": "Log not found."
}

Get insights

This endpoint is mainly kept for backwards compatibility. For new applications, getting the insights together with the log info from the log endpoint is recommended.
GET https://api.mclo.gs/1/insights/[id]
Field Type Description
[id] string The log file id, received from the paste endpoint or from a URL (https://mclo.gs/[id]).

Success application/json

{
  "id": "name/type",
  "name": "Software name, e.g. Vanilla",
  "type": "Type name, e.g. Server Log",
  "version": "Version, e.g. 1.12.2",
  "title": "Combined title, e.g. Vanilla 1.12.2 Server Log",
  "analysis": {
    "problems": [
      {
        "message": "A message explaining the problem.",
        "counter": 1,
        "entry": {
          "level": 6,
          "time": null,
          "prefix": "The prefix of this entry, usually the part containing time and loglevel.",
          "lines": [
            {
              "number": 1,
              "content": "The full content of the line."
            }
          ]
        },
        "solutions": [
          {
            "message": "A message explaining a possible solution."
          }
        ]
      }
    ],
    "information": [
      {
        "message": "Label: value",
        "counter": 1,
        "label": "The label of this information, e.g. Minecraft version",
        "value": "The value of this information, e.g. 1.12.2",
        "entry": {
          "level": 6,
          "time": null,
          "prefix": "The prefix of this entry, usually the part containing time and loglevel.",
          "lines": [
            {
              "number": 6,
              "content": "The full content of the line."
            }
          ]
        }
      }
    ]
  }
}

Error application/json

{
    "success": false,
    "error": "Log not found."
}

Analyse a log without saving it

If you only want to use the analysis features of this service without saving the log, you can use this endpoint. Please do not save logs that you only want to analyse, as this wastes storage space and resources.

POST https://api.mclo.gs/1/analyse application/x-www-form-urlencoded application/json
Field Type Description
content string The raw log file content as string. Maximum length is 10MiB and 25k lines, will be shortened if necessary.

Success application/json

{
  "id": "name/type",
  "name": "Software name, e.g. Vanilla",
  "type": "Type name, e.g. Server Log",
  "version": "Version, e.g. 1.12.2",
  "title": "Combined title, e.g. Vanilla 1.12.2 Server Log",
  "analysis": {
    "problems": [
      {
        "message": "A message explaining the problem.",
        "counter": 1,
        "entry": {
          "level": 6,
          "time": null,
          "prefix": "The prefix of this entry, usually the part containing time and loglevel.",
          "lines": [
            {
              "number": 1,
              "content": "The full content of the line."
            }
          ]
        },
        "solutions": [
          {
            "message": "A message explaining a possible solution."
          }
        ]
      }
    ],
    "information": [
      {
        "message": "Label: value",
        "counter": 1,
        "label": "The label of this information, e.g. Minecraft version",
        "value": "The value of this information, e.g. 1.12.2",
        "entry": {
          "level": 6,
          "time": null,
          "prefix": "The prefix of this entry, usually the part containing time and loglevel.",
          "lines": [
            {
              "number": 6,
              "content": "The full content of the line."
            }
          ]
        }
      }
    ]
  }
}

Error application/json

{
    "success": false,
    "error": "Required field 'content' is empty."
}

Check storage limits

GET https://api.mclo.gs/1/limits

Success application/json

{
  "storageTime": 7776000,
  "maxLength": 10485760,
  "maxLines": 25000
}
Field Type Description
storageTime integer The duration in seconds that a log is stored for after the last view.
maxLength integer Maximum file length in bytes. Logs over this limit will be truncated to this length.
maxLines integer Maximum number of lines. Additional lines will be removed.

Get filters

Filters modify the log content before storing it. They are applied automatically when creating a new log on the server side. You can get a list of active filters from this endpoint if you want to apply the same filters on the client side before uploading a log.

GET https://api.mclo.gs/1/filters

Success application/json

[
    {
        "type": "trim",
        "data": {}
    },
    {
        "type": "limit-bytes",
        "data": {
            "limit": 10485760
        }
    },
    {
        "type": "limit-lines",
        "data": {
            "limit": 25000
        }
    },
    {
        "type": "regex",
        "data": {
            "patterns": [
                {
                    "pattern": "(?<!version:? )(?<!([0-9]|-|\\w))([0-9]{1,3}\\.){3}[0-9]{1,3}(?![0-9])",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "**.**.**.**"
                }
            ],
            "exemptions": [
                {
                    "pattern": "^127\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$",
                    "modifiers": [
                        "i"
                    ]
                },
                {
                    "pattern": "^0\\.0\\.0\\.0$",
                    "modifiers": [
                        "i"
                    ]
                },
                {
                    "pattern": "^1\\.[01]\\.[01]\\.1$",
                    "modifiers": [
                        "i"
                    ]
                },
                {
                    "pattern": "^8\\.8\\.[84]\\.[84]$",
                    "modifiers": [
                        "i"
                    ]
                }
            ]
        }
    },
    {
        "type": "regex",
        "data": {
            "patterns": [
                {
                    "pattern": "(?<=^|\\W)((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4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ers": [
                        "i"
                    ],
                    "replacement": "****:****:****:****:****:****:****:****"
                }
            ],
            "exemptions": [
                {
                    "pattern": "^[0:]+1?$",
                    "modifiers": [
                        "i"
                    ]
                }
            ]
        }
    },
    {
        "type": "regex",
        "data": {
            "patterns": [
                {
                    "pattern": "C:\\\\Users\\\\([^\\\\]+)\\\\",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "C:\\Users\\********\\"
                },
                {
                    "pattern": "C:\\\\\\\\Users\\\\\\\\([^\\\\]+)\\\\\\\\",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "C:\\\\Users\\\\********\\\\"
                },
                {
                    "pattern": "C:\\\/Users\\\/([^\\\/]+)\\\/",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "C:\/Users\/********\/"
                },
                {
                    "pattern": "(?<!\\w)\\\/home\\\/[^\\\/]+\\\/",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "\/home\/********\/"
                },
                {
                    "pattern": "(?<!\\w)\\\/Users\\\/[^\\\/]+\\\/",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "\/Users\/********\/"
                },
                {
                    "pattern": "USERNAME=\\w+",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "USERNAME=********"
                }
            ],
            "exemptions": []
        }
    },
    {
        "type": "regex",
        "data": {
            "patterns": [
                {
                    "pattern": "\\(Session ID is token:[^:]+\\:[^)]+\\)",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "(Session ID is token:****************:****************)"
                },
                {
                    "pattern": "--accessToken [^ ]+",
                    "modifiers": [
                        "i"
                    ],
                    "replacement": "--accessToken ****************:****************"
                }
            ],
            "exemptions": []
        }
    }
]

Filter types

Type Description
trim Trim any whitespace characters from the beginning and end of the log content.
limit-bytes Limit the log content to a maximum number of bytes (data.limit). Content exceeding this limit will be truncated.
limit-lines Limit the log content to a maximum number of lines (data.limit). Additional lines will be removed.
regex Apply regular expression replacements to the log content. Each pattern in data.patterns will be applied in order and replaced with the provided replacement, unless the matched string matches one of the exemption patterns in data.exemptions.
Make sure to handle any filter error, e.g. unknown filter types gracefully, as new filter types may be added in the future.

Notes

The API has currently a rate limit of 60 requests per minute per IP address. This is set to ensure the operability of this service. If you have any use case that requires a higher limit, feel free to contact us.