REST api for initial setup process?

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 metabase/docs/api-documentation.md at master · metabase/metabase · GitHub link, but I am not able to find the Exact api for initial setup.

Can anyone help me on this ?

Setup

Setup Process · metabase/metabase Wiki · GitHub

Navdeep

Found the resolution.

1 Like

@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

{"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
                }
         
1 Like

hello ,

someone has an example how the output should look like?
like curl -X POST -H "Content-Type: application/json" -d '{"username": "xxx", "password": "xx"}' http://localhost:3000/api/session

what to write in engine schedule etc ...

thank you