Rest API - Developer Access to Database

You can access VanadiumDB via a standard REST-API via POST-Request in the JSON-format:

Endpoint /

GET http://localhost:8080/

Result

{"status":"VanadiumDB is running"}

Endpoint /login

POST http://localhost:8080/login

Body

{"Name":"horst", "Password": "password2344asr234"}

Result

HTTP 200 OK + Cookie “vanadiumdbcookie”

null

Endpoint /register

POST http://localhost:8080/register

Body

{"Name":"horst", "Password": "password"}

Result

HTTP 201 Created

null

Endpoint /query

POST http://localhost:8080/query
  • HTTP Cookie “vanadiumdbcookie”

Body

{"query":"SELECT * FROM art2;"}

Add the SQL-query inside of the value of “query”. Unescape all "with a backslash \"

Result

{
    "queryID": 1771924913671616415,
    "status": 200,
    "result": "Success",
    "Columns": [
        {
            "columName": "id",
            "type": {
                "Name": "INT",
                "DefaultLength": 10,
                "Regex": "\\d+"
            },
            "length": 10,
            ...
        },
       ...
    ],
    "rows": 6,
    "RawData": [
        [
            "0",
            "Mona Lisa",
            "Leonardo da Vinci",
            "1503",
            "Oil on poplar panel",
            "Louvre",
            "77.0",
            "53.0",
            "wood"
        ],
        ...
    ],
    "logType": 0
}

VGwort