REST API General Information

INFO

Find here general information about using the REST API.

Data Compatibility 

INFO

All JSON files and their formats from previous versions of Datameer X are backwards compatible to work with newer versions of Datameer X .

Usage of Payload

INFO

A payload is a JSON representation of all information entered during the creation process using the web interface, e.g. you create a connection via the Connection Wizard in the File Browser. As a result of the creation, the <job-payload>.json is created during a REST API read call and can be used in further REST API calls to adjust the import/ file upload etc.

All mandatory parameters for the payload are set during the creation process of an artifact before.

An example for an export job payload is:

{
  "version": "10.1.0",
  "className": "datameer.dap.common.entity.FileDataSinkImpl",
  "file": {
    "uuid": "4150a96a-1177-4b97-a052-afd37a3c6446",
    "path": "/Data/ExportJobs/Test_ExportJob.exp",
    "description": "",
    "name": "Test_ExportJob"
  },
  "scheduleEnabled": true,
  "pullType": "WHEN_NEW_DATA_COMES_IN",
  "minKeepCount": 1,
  "properties": {
    "character_encoding": [
      "UTF-8"
    ],
    "consecutive_numbering": [
      ""
    ],
    "delimiter": [
      ","
    ],
    "escapeCharacter": [
      "\\"
    ],
    "filename": [
      "/home"
    ],
    "header": [
      "true"
    ],
    "max_filesize_in_mb": [
      ""
    ],
    "quoteCharacter": [
      "\""
    ],
    "replace_data": [
      "false"
    ]
  },
  "hadoopProperties": "",
  "connection": "/Data/Connections/Datameer server filesystem",
  "sheet": {
    "name": "Sheet1",
    "sheetId": "ef3fb782-4028-4ba2-9f23-ce896b7a9eac",
    "workbook": {
      "path": "/Users/admin/Workbook.wbk",
      "uuid": "ca35dc54-45de-4ffb-aa9e-70f1c194ba9c"
    }
  },
  "mappings": [
    {
      "name": "A",
      "srcColumnIndex": 0,
      "nullable": true
    }
  ],
  "errorHandlingMode": "DROP_RECORD",
  "notificationAddresses": "",
  "notificationSuccessAddresses": "",
  "confirmOverwrite": false,
  "exportFileType": "datameer.dap.common.csv.CsvExportFileType"
}

REST API and JMX

INFO

You can also start Datameer X with the following parameters, causing the internal MBean server to start with Datameer X .

<Datameer Application Folder>/bin/conductor.sh start --jmx

To do so:

  1. Open the JConsole. The Datameer X RestController opens as an MBean.

    # jconsole localhost:6789
  2. Access the following operations. The status for these operations is returned as a JSON either as a file or directly in the command line interface.

    readJobStatus
    readJobHistory
    readJobExecution
    deleteJobExecutionData

Authentication

INFO

For enhanced security performance, users are not able authenticate a REST API call using session cookies.

Datameer X recommends using basic authentication when using the REST API.

curl -u <username>:<password>