Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section

Create a Connection

Request Method POST
Description

Adds a connection in Datameer.

URI Syntax


Panel

curl -u '<username>:<password>' -X POST -d @<job-payload>.json 'http://<Datameer-serverIP>:<port-number>/rest/connections'

No Format
curl -u '<username>:<password>' -X POST -d @<job-payload>.json 'http://<Datameer-serverIP>:<port-number>/rest/connections'
Code Block
languagebash
curl -u '<username>:<password>' -X POST -d @<job-payload>.json 'http://<Datameer-serverIP>:<port-number>/rest/connections'


Example Response


Code Blocknoformat
{
"configuration-id": 8,
"status": "success"
}


Additional Notes

<job-payload>.json

  • The payload is a JSON representation of all information entered during the creation process using the web interface.
  • An easy method of creating a payload is to use REST to read an import job, data link, or workbook and change the JSON that is returned.

Encryption

  • When creating a connection and the password or SSH key is in plain text within the JSON file, the sensitive data will not be secure while passing from the local host over the network until encrypted by Datameer.
  • Datameer X provides the tool encrypt.sh that can encrypt sensitive information before it is sent via REST to Datameer.
    • The tool is called encrypt.sh and is located in the bin folder within Datameer.

      Syntax:

      encrypt.sh -v <password to encrypt>

      Example Response:

      SECURE:0:hnDNk3ZOWZn9bwDiGp7MNuvyEZPHIinQ
       

  • This encrypted password or SSH key can then be added to the JSON file used in creating a connection to securely transfer the information.

Knowledge Base Article:

How to create a connection via REST API calls

Creating a missing folder

A new folder is created when all connection capabilities and permissions are sufficient.


...