REST api for initial setup process?


#1

Hi Community,

I am working on Integration of Metabase with ERPNext. I want to automate the process of setup which is required initially to use Metabase(I.e Database-Name, Database-Password, Database-Username etc).

I tried to look into API available on https://github.com/metabase/metabase/blob/master/docs/api-documentation.md link, but I am not able to find the Exact api for initial setup.

Can anyone help me on this ?

Setup

https://github.com/metabase/metabase/wiki/Setup-Process

Navdeep


#2

Found the resolution.


#3

@jornh

What’s format for details parameter map ?
What are the required parameters to be included for creating a new database instance using rest api.

Is  it right format for details map?
 {
"name": "", "host": "", "port":"",
"database_name":"", "database_username": "", "database_password": ""
}

Sorry for tagging, but I am unable to find the right parameters to create database instance for metabase using rest api.

Navdeep


#4
{"details":{ 
                
                    "host": "host",
                    "port": "port",
                   "dbname": "dbname",
                    "user": "dbuser",
                    "password": "dbpassword",
            }
}

OR

"mysql": {
            "details-fields": [
                {
                    "name": "host",
                    "display-name": "Host",
                    "default": "localhost"
                },
                {
                    "name": "port",
                    "display-name": "Port",
                    "type": "integer",
                    "default": 3306
                },
                {
                    "name": "dbname",
                    "display-name": "Database name",
                    "placeholder": "birds_of_the_word",
                    "required": true
                },
                {
                    "name": "user",
                    "display-name": "Database username",
                    "placeholder": "What username do you use to login to the database?",
                    "required": true
                },
                {
                    "name": "password",
                    "display-name": "Database password",
                    "type": "password",
                    "placeholder": "*******"
                },
                {
                    "name": "additional-options",
                    "display-name": "Additional JDBC connection string options",
                    "placeholder": "tinyInt1isBit=false"
                },
                {
                    "name": "tunnel-enabled",
                    "display-name": "Use SSH tunnel",
                    "placeholder": "Enable this ssh tunnel?",
                    "type": "boolean",
                    "default": false
                },
                {
                    "name": "tunnel-host",
                    "display-name": "SSH tunnel host",
                    "placeholder": "What hostname do you use to connect to the SSH tunnel?",
                    "required": true
                },
                {
                    "name": "tunnel-port",
                    "display-name": "SSH tunnel port",
                    "type": "integer",
                    "default": 22,
                    "required": false
                },
                {
                    "name": "tunnel-user",
                    "display-name": "SSH tunnel username",
                    "placeholder": "What username do you use to login to the SSH tunnel?",
                    "required": true
                },
                {
                    "name": "tunnel-pass",
                    "display-name": "SSH tunnel password",
                    "type": "password",
                    "placeholder": "******",
                    "required": true
                }