@baseUrl = 127.0.0.1:3000
@token=d45dfa10-575b-4f29-b84f-85e98cb26ebe
@id=92784ec9-d956-40e3-8d9c-4607da3a48a3

### 1. Récupérer la valeur setup-token
GET /api/session/properties
Host: {{baseUrl}}
Content-Type: application/json

### Créer l'administrateur
# token = setup-token
# Récupérer l'id de session
POST /api/setup
Host: {{baseUrl}}
Content-Type: application/json

{
  "token":"{{token}}",
  "user": {
    "first_name":"Emmanuel",
    "last_name":"Medina",
    "site_name":"IUT",
    "email":"emmanuel.medina@univ-lorraine.fr",
    "password":"sUperm0tdep@ss3"
  },
  "prefs": {
    "site_name":"IUT",
    "site_locale":"fr"
  }
}


### Liste des base de données
GET /api/database
Host: {{baseUrl}}
Content-Type: application/json
X-Metabase-Session: {{id}}

### Ajouter la base de données
# X-Metabase-Session = id
POST /api/database
Host: {{baseUrl}}
Content-Type: application/json
X-Metabase-Session: {{id}}

{
  "engine":"postgres",
  "name":"ventdest",
  "is_on_demand":false,
  "is_full_sync":true,
  "is_sample":false,
  "cache_ttl":null,
  "refingerprint":false,
  "auto_run_queries":true,
  "schedules":{},
  "details":{
    "host":"database",
    "port":null,
    "dbname":"sql",
    "user":"sql",
    "password":"!ChangeMe!",
    "ssl":false,
    "tunnel-enabled":false,
    "advanced-options":false
  }
}

### Login
POST /api/session
Host: {{baseUrl}}
Content-Type: application/json

{ "username": "admin@example.com",
  "password": "sUperm0tdep@ss3" }
