How to Create a Connection Via REST API Calls


How-to create a "Connection" via REST API calls to access a MySQL database.

For this example the (local) Datameer MySQL database is used. 



Step-by-step guide

First gather a valid JSON dump according to our documentation REST API Connections - ReadConnection and dump it into a file by using the redirect output via

> ToLocalMySQLInstance.JSON

This dump will be used now to create a new "Connection" by editing it. Within the JSON dump you find at first a block where you can specify the name of the artifact and connection. I show an example for a connection to the Datameer local MySQL instance and dap database.

"version": "4.5.5",
"className": "datameer.dap.common.entity.DataBaseConnection",
"file": {
"uuid": "00000000-0000-0000-0000-000000000000",
"path": "/Data/Connections/ToLocalMySQLInstance.dst",
"description": "To local MySQL instance.",
"name": "ToLocalMySQLInstance"
"typeId": "das.JdbcDataStoreType",
"properties": {
"user_name": [
"password": [
"key.connectionUrl": [
"dataStoreTemplate": [
"dataStoreUsage": [
"dbType": {
"name": "MySQL"

The created or edited payload you can now upload according REST API Connections - Create Connection.

The UUID zeroed is a required field. If another similar UUID exists in the DB, Datameer will automagically create another UUID on the fly. If the given path and folder is not existing, the folder and the structure will be created during upload.

Note: If the payload document has multiple UUIDs, make sure that they are all unique.