-->

API Documentation

Allgemeine Information

Die API ist für Entwickler, um Sachen zu vereinfachen.



Open API Endpoint: https://marvinmc.dev/api/

IP-Adresse

GET/ip
127.0.0.1


GET/ip/json
{"ip":"127.0.0.1"}


Calculator

GET/calc
18


GET/calc/json
{
    "expression":"(5+5)*2-((10\/4)-0.5)",
    "result":"18"
}


GET/calc/xml

    (5+5)*2-((10/4)-0.5)
    18


Query Type Description
(full Query String) String Math calculation allowed are all numbers and: ( ) + - * / : . ,

Examples:
Text: https://marvinmc.dev/api/calc?(5+5)*2-((10/4)-0.5)
Json: https://marvinmc.dev/api/calc/json?(5+5)*2-((10/4)-0.5)
XML: https://marvinmc.dev/api/calc/xml?(5+5)*2-((10/4)-0.5)


Minecraft Server Ping

GET/minecraft/json
{
    "description":{
        "text":"\u00a7aTestserver (\u00a76\u00a7lMarvinMC-Hosting\u00a7a)\n\u00a78141.95.14.85 \u00a77user null"
    },
    "players":{
        "max":20,
        "online":0
    },
    "version":{
        "name":"Paper 1.12.2",
        "protocol":340
    },
    "favicon":"data:image\/png;base64,iVBORw0KGgoAAAAN...",
    "ping":41,
    "ip":"141.95.14.85",
    "port":10003
}


GET/minecraft/xml

    
        §aTestserver (§6§lMarvinMC-Hosting§a) §8141.95.14.85 §7user null
    
    
        20
        0
    
    
        Paper 1.12.2
        340
    
    data:image/png;base64,iVBORw0KGgoAAAAN...
    41
    141.95.14.85
    10003


Query Type Description
(full Query String) String Minecraft Server Address (mmc.wtf, marvinmc.net:10003, ...)

Examples:
Json: https://marvinmc.dev/api/minecraft/json?marvinmc.net:10003
XML: https://marvinmc.dev/api/minecraft/xml?marvinmc.net:10003


IP Whois

GET/whois/json Available soon
{}


Query Type Description
(full Query String) String IP-Address

Example: https://marvinmc.dev/api/whois/json?1.1.1.1



Random String

GET/random-string.php
Query Type Description
numbers boolean Enable Numbers to String generation *(Default: true)
lowercase boolean Enable lowercase letters to String generation *(Default: true)
uppercase boolean Enable uppercase letters to String generation *(Default: true)
special boolean Enable special characters to String generation *(Default: false)
length integer Sets the String length *(Default: 8)

Example: https://marvinmc.dev/api/random-string.php?length=8&lowercase=true&uppercase=true&numbers=true&special=false


Base64 to Image

GET/base64img.php CHANGES PLANNED

Example: https://marvinmc.dev/api/base64img.php?marvinmc.net:25565


XML to Json string

GET/xml-to-json.php
QueryTypeDescription
urlstring (url)Url from XML file


Unixtime Converter

GET/time.php

Date to Unix

QueryTypeDescription
datedate OR "curr"Date to Convert (YYYY-MM-DD hh:mm:ss)

Examples:
https://marvinmc.dev/api/time.php?date=2000-01-02 12:00:00 (2nd of January 2000)
https://marvinmc.dev/api/time.php?date=curr

Unix to Date

QueryTypeDescription
unixunix OR "curr"Unixtime to Convert
zonetimezone (default: Europe/Berlin)Time for specific Timezone (optional)

Timezones:

Examples:
https://marvinmc.dev/api/time.php?unix=946814400 (2nd of January 2000)
https://marvinmc.dev/api/time.php?unix=curr


Hosting API Endpoint: https://hosting.marvinmc.net/

In API the {server.id} stands for the ID the server is using and needs to be there. An example coud be: 622175113793634325.
You dont have to write something in {path}. It is at least not necessary to have to and stands for the path the server needs to go.
{server.token} is like the name you said the token to get into the system just like a key to open a door or a password.


Folders/Filecontent Listing

GET/{server.id}/{path}?token={server.token}
{
    "Files":
    [
        {
            "name":"banned-ips.json",
            "isFolder":false,
            "size":2
        },
        {
            "name":"banned-players.json",
            "isFolder":false,
            "size":2
        },
        {
            "name":"bukkit.yml",
            "isFolder":false,
            "size":1048
        },
        {
            "name":"cache",
            "isFolder":true,
            "size":75392947
        },
        {
            "name":"commands.yml",
            "isFolder":false,
            "size":641
        },
        {
            "name":"data.json",
            "isFolder":false,
            "size":1036
        },
        {
            "name":"eula.txt",
            "isFolder":false,
            "size":10
        },
        {
            "name":"help.yml",
            "isFolder":false,
            "size":2576
        },
        {
            "name":"logs",
            "isFolder":true,
            "size":2456556711
        },
        {
            "name":"ops.json",
            "isFolder":false,
            "size":2
        },
        {
            "name":"paper.yml",
            "isFolder":false,
            "size":5417
        },
        {
            "name":"permissions.yml",
            "isFolder":false,
            "size":0
        },
        {
            "name":"plugins",
            "isFolder":true,
            "size":36062105
        },
        {
            "name":"server-icon.png",
            "isFolder":false,
            "size":2523
        },
        {
            "name":"server.jar",
            "isFolder":false,
            "size":40979699
        },
        {
            "name":"server.properties",
            "isFolder":false,
            "size":1030
        },
        {
            "name":"spigot.yml",
            "isFolder":false,
            "size":3310
        },
        {
            "name":"token.txt",
            "isFolder":false,
            "size":16
        },
        {
            "name":"usercache.json",
            "isFolder":false,
            "size":649
        },
        {
            "name":"version_history.json",
            "isFolder":false,
            "size":48
        },
        {
            "name":"wepif.yml",
            "isFolder":false,
            "size":1565 },
        {
            "name":"whitelist.json",
            "isFolder":false,
            "size":2 
        },
        {
            "name":"world",
            "isFolder":true,
            "size":450959757
        },
        {
            "name":"world_the_end",
            "isFolder":true,
            "size":1219009
        }
    ],
    "GoBackURL":""
}


Delete File/Folder

DELETE/{server.id}/{path}?token={server.token}

Example Response:
{
    "GoBackURL":""
}


Save File Content

PUT/{server.id}/{path}?token={server.token}

This must be a file

Json Params
FieldTypeDescription
content string The new Content of the File (Need json string)

Example Response:
{
    "GoBackURL":""
}


Create Folder/File

POST/{server.id}/{path}?token={server.token}

Json Params
FieldTypeDescription
type string (folder/file) Select the type (file or folder)
name string The name of the file or Folder (not required)

Example response:
{
    "GoBackURL":""
}


Upload file

POST/{server.id}/{path}?token={server.token}

Json Params
FieldTypeDescription
fileSrc string (url) this url have to be a direct download link.

Example response:
{
    "success":true
}