Versions Compared

Key

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

...

Section

List All Connections

Request Method GET
Description

Returns a list of all the connections in Datameer. This list displays the description, id number, name, path, and uuid of the connector. 

URI Syntax


Code Blocknoformat
curl -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number/rest/connections'


Example Response


Code Blocknoformat
[
{
    "description": "hidden datastore to upload files: FileUploadDataStore",
    "id": 1,
    "name": "FileUploadDataStore",
    "path": "/.system/FileUploadDataStore.dst",
    "uuid": "708d54ed-6d73-4de7-b332-f26f5246c972"
}
,{
    "description": "A data store for the local filesystem where Datameer X is running.  Note, this works ONLY for Datameer X Personal, Workgroup, and Trial editions.\n",
    "id": 2,
    "name": "Datameer X server filesystem",
    "path": "/Data/Connections/Datameer X server filesystem.dst",
    "uuid": "0eb55632-85e2-404c-85f6-dea1a392dc2c"
}
,{
    "description": "Data files for some examples are hosted in Amazon's cloud (S3). Using this data store will download these files into your system and requires internet access",
    "id": 3,
    "name": "Examples in S3",
    "path": "/Examples/Public Data/Examples in S3.dst",
    "uuid": "af2cb4de-40f5-4441-b82e-9b67136d0d6a"
}
,{
    "description": "Data files for some examples are hosted by Infochimps.com in Amazon's cloud (S3). Using this data store will download these files into your system and requires internet access",
    "id": 4,
    "name": "Examples from Infochimps",
    "path": "/Examples/Public Data/Examples from Infochimps.dst",
    "uuid": "140ac500-2697-484f-a937-1ac2c617bd22"
}
,{
    "description": "",
    "id": 5,
    "name": "diConnection",
    "path": "/Applications/peter/diConnection.dst",
    "uuid": "532e8a9d-87c2-42f1-9af3-af2e06a99034"
}
]



...

Section

Update a Connection

Request Method PUT
Description

Edits an existing connection in Datameer.

Prerequisites
URI Syntax


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


Example Response


Code Blocknoformat
{"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.

Creating a missing folder

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


...

Section

Delete a Connection

Request Method DELETE
Description

Removes a connection from Datameer.

URI Syntax


Code Blocknoformat
curl -u '<username>:<password>' -X DELETE 'http://<Datameer-serverIP>:<port-number>/rest/connections/<job-configuration-id>'


Example Response


Code Blocknoformat
{"status": "success"}




Section

Connection Dependencies

Request Method GET
Description

Returns the hierarchy of up- and downstream dependencies for a given connection.

Prerequisites


Info
titleINFO

This API requires enabling /wiki/spaces/DASSB100/pages/32569527063.


URI Syntax


Code Blocknoformat
curl -u '<username>:<password>' -X GET 'http://<server>:<port>/api/connections/<configurationId>/dependencies[?direction=<upstream | downstream>][&level=<number>]'


Example Response


Code Blocknoformat
{
 "dependencies": [
 {
 "id": 13,
 "file": {
 "path": "/Data/ImportJobs/TechCrunch_continental_USA",
 "name": "TechCrunch_continental_USA",
 "type": "imp",
 "description": "A listing of company funding records reported by TechCrunch.",
 "uuid": "47c25d9a-6a71-4778-8f88-c42217b39a08"
 }
 },
 {
 "id": 10,
 "file": {
 "path": "/Data/ImportJobs/Sales_Jan_2009",
 "name": "Sales_Jan_2009",
 "type": "imp",
 "description": "Sales transactions during the month of January 2009.",
 "uuid": "158dc464-db46-4da8-af51-cf8be06cadc4"
 }
 }


Additional Notes

Path parameters:

  • configurationId:
    • Data type must be a number
    • Use the configuration ID

Query parameters:

  • Direction:
    • Data type must be a string
    • Optional
    • Shows either upstream or downstream
    • If left blank, shows both
  • Level:
    • Data type must be a number
    • Optional
    • If left blank, shows all levels


...