Main Routes#

These are just some general purpose routes that don’t really fall in any category


  • GET: /check

    Check if the API is working fine

    Return Example:
    {"codes": [200]}
    

  • GET: /benchmark/<mode>, defaults={“mode”: 1}

    Return a list of benchmarks scores based on a selected mode

    parameters:

    mode (int[1-3] or none) - (Optional) - Benchmark mode

    headers:

    all (True, False or None) - (Optional) - All benchmark modes in one response

    Return Example:
    {"codes": [200], "data":
      {"sort": [
        {"mode": 1,
         "processor": "AMD Ryzen 5600",
         "time": 76.4053},
        ...
      ], "all": [
        {"mode": 3,
         "processor": "AMD Ryzen 2600",
         "time": 685.1376},
        ...
    ]}}
    

  • GET: /mqtt/<days>, defaults={“days”: 7}

    Return the MQTT Log of the past <days> days

    parameters:

    days (int or none) - (Optional) - Days of Log, -1 is the whole log

    Return Example:
    {"codes": [200], "data":
       [
          {"event": "Loss of WiFi",
           "time": "2022.03.30 16:51"},
          ...
      ]
    }
    

  • GET: /codec/encode

    A not very secure way to encode a text message

    headers:
    text (string) - Text to encode
    seed (string or none) - (Optional) - Seed to use
    Return Example:
    {"codes": [200], "data":
        {"text": "%LG]UOaÄ7;OeB,>]5(ß9Aq}ÖM,g!ö",
         "seed": "4a2bb39750bcc4d1bfcf65f9ac3447ee"}
    }
    

  • GET: /codec/decode

    Decode a previously encoded text message

    headers:
    text (string) - Text to encode
    seed (string) - Seed to use
    Return Example:
    {"codes": [200], "data":
        {"text": "Hi",
         "seed": "4a2bb39750bcc4d1bfcf65f9ac3447ee"}
    }