Versions Compared

Key

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

Table of Contents

Info
titleINFO

Add the following command after the username and password to receive more meaningful HTTP errors:

Code Block
-w"\n%{http_code}\n"

This command can be added to each call.

Anchor
datavolumelimit
datavolumelimit
Data Volume Limit

Request Method GET
Description

Returns the volume size of a job (in bytes).

URI Syntax
Code Block
curl -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/rest/job-configuration/volume-report/<job-configuration-id>'
Example Response
Code Block
{
    "id": 187,
    "jobStatus": "COMPLETED",
    "importedVolume": 56765,
    "type": "NORMAL"
  },
  {
    "id": 186,
    "jobStatus": "COMPLETED",
    "importedVolume": 4098,
    "type": "NORMAL"
  }

Anchor
globalvollicenseinfo
globalvollicenseinfo
Global Volume and License Information

Request Method GET
Description

Returns information on your Datameer X product. This information includes the product ID, version, license holder, license type, start date of license, expiration of license, volume period, volume limit (in bytes), and total volume consumed (in bytes).

URI Syntax
Code Block
curl -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/rest/license-details'
Example Response
Code Block
{
  "ProductId": "4c4038ba-3250-4844-b432-7c8f64d85807",
  "ProductVersion": "10.1.2",
  "LicenseHolder": "CN=John Doe,O=Datameer
,
 X STREET=Unknown,L=Unknown Unknown,ST=Unknown,C=Unknown",
  "LicenseType": "Enterprise",
  "LicenseStartDate": "Jan 23, 2020 5:20:10 PM",
  "LicenseExpirationDate": "Mar 25, 2020 5:20:10 PM",
  "LicenseVolumePeriodInMonths": 1,
  "LicenseVolumelimitInBytes": 214748364800,
  "TotalVolumeConsumedInBytes": 38758720
}

Anchor
uploadlic
uploadlic
Upload License File

Request Method POST
Description

Uploads a license file to Datameer.

URI Syntax
Code Block
curl -u '<username>:<password>' -X POST --form "file=@<license path>" http://<Datameer-serverIP>:<port-number>/license/upload
Example Response

If the license is accepted

Code Block
VALID

If the license is not accepted

Code Block
INVALID

Anchor
productid
productid
Product ID

Request Method GET
Description

Returns the product ID and product version.

URI Syntax
Code Block
curl -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/license/product-id'
Example Response
Code Block
4b4038ba-3550-4844-b432-4c6f64d80807das-test:Datameer-2.1.3-1.0.3

Anchor
metrics
metrics
Metrics

Request Method GET
Description

Viewing the metrics in JSON format.

URI Syntax
Code Block
curl -s -S -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/rest/monitor/'
curl -s -S -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/rest/monitor/prependLabel'
Additional Notes

An HTML table of the metrics for the current collection interval can be viewed with the following command: 

Code Block
curl -s -S -u '<username>:<password>' -X GET 'http://<Datameer-serverIP>:<port-number>/rest/monitor/html'

Anchor
jamon
jamon
JAMon

Request Method PUT
Description

Allows clients to enable or disable JAMon at runtime.

URI Syntax

INFO: If your file name includes " " (empty spaces), replace those spaces with "+".

Code Block
curl -s -S -u '<username>:<password>' -X PUT 'http://<Datameer-serverIP>:<port-number>/rest/monitor/enable'
curl -s -S -u '<username>:<password>' -X PUT 'http://<Datameer-serverIP>:<port-number>/rest/monitor/disable'

Workbook Variables

Anchor
create_variable
create_variable
Create a Variable

Request Method POST
Description

Creates a variable value that can be called within Datameer X paths and workbooks.

URI Syntax
Code Block
curl -u <username>:<password> -X POST 'http://<Datameer-serverIP>:<port-number>/api/variables' -d '[{ "name":"<variable name>", "value":"<variable value>"}, {"name":"<variable name>", "value":"<variable value>"}]' -H "Content-Type: application/json"
Example Response


Code Block
[
  {"created": 1552379198782, "id": 1, "modified": 1552379198782, "name": "name1", "type": "STRING", "value": "value1"},
  {"created": 1552379198783, "id": 2, "modified": 1552379198783, "name": "name2", "type": "STRING", "value": "value2"}
]

Anchor
update_variable
update_variable
Update a Variable

Request Method PUT
Description

Updates a variable value that can be called within Datameer X paths and workbooks. It contains the information for creation number, workbook id, last modified, name, type and value. 
INFO: It is not required to execute a job to update a workbook variable. The workbook variables are specified prior to job execution to influence the results.

URI Syntax

INFO: Instead of the id, the current name can be used in the URL. Both, name and value in the JSON body are optional.

Code Block
curl -u <username>:<password> -X PUT 'http://<Datameer-serverIP>:<port-number>/api/variables/
<variable-name> or <variable-id>
<id>' 
-d '{ "name":"newName", "value":"newValue" }' -H "Content-Type: application/json" 

or

Code Block
curl -u <username>:<password> -X PUT 'http://<Datameer-serverIP>:<port-number>/api/variables/<name>'
-d '{ "name":"
<new name>
newName", "value":"
<new value>
newValue" }' -H "Content-Type: application/json" 
Example Response


Code Block
{
    "created": "1552379198782",
    "id": "1
,
"
    "modified": "1552489010718
,
"
    "name": "
newName",
name1"
    "type": "STRING"
,

    "value": "
newValue
value1"
}

Update Multiple Variables

Request Method PUT
Description

Updates multiple variable values that can be called within Datameer X paths and workbooks.

URI Syntax
Code Block
curl -u <username>:<password> -X PUT 'http://<Datameer-serverIP>:<port-number>/api/variables' -d '[{ "id":1, "name":"<new name>", "value":"<new value>" }, { "id":2, "name":"<new name>", "value":"<new value>" }]' -H "Content-Type: application/json"
Example Response

INFO: The variables are identified by id, the ids must be present in the JSON body of the request.

Code Block
[
  { "created": 1552379198782, "id": 1, "modified": 1552489010718, "name": "newName", "type": "STRING", "value": "newValue" }
  { "created": 1552379198783, "id": 2, "modified": 1552489010734, "name": "newName2", "type": "STRING", "value": "newValue2" }
]

Anchor
delete_variable
delete_variable
Delete a Variable

Request Method DELETE
Description

Deletes a variable value that can be called within Datameer X paths and workbooks.

URI Syntax
Code Block
curl -u <username>:<password> -X DELETE 'http://<Datameer-serverIP>:<port-number>/api/variables/<variable-name> or <variable-id>'
Example Response

If the request is successful, there is no output.

Delete Multiple Variables

Request Method DELETE
Description

Deletes multiple variable values that can be called within Datameer X paths and workbooks.

URI Syntax
Code Block
curl -u <username>:<password> -X DELETE 'http://<Datameer-serverIP>:<port-number>/api/variables' -d '["<variable-name> or <variable-id>", "<variable-name> or <variable-id>"]' -H "Content-Type: application/json"
Example Response

If the request is successful, there is no output.

Anchor
list_variable
list_variable
List a Variable

Request Method GET
Description

Displays a list of information about variables values that can be called within Datameer X paths and workbooks. It contains the information for creation number, workbook id, last modified, name, type and value.
INFO: It is not required to execute a job to list a workbook variable. The workbook variables are specified prior to job execution to influence the results.

URI Syntax

INFO: Instead of the id, the current name can be used in the URL.

Code Block
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/api/variables/<variable-name> or <variable-id>'
Example Response


Code Block
{
    "created": "1552379198782",
    "id": "1
,
"
    "modified": "1552489010718
,
"
    "name": "name1"
,

    "type": "STRING"
,

    "value": "value1"
}

List all variables

Request Method GET
Description

Displays a list of information about all variables values that can be called within Datameer X paths and workbooks.

INFO: It is not required to execute a job to list a workbook variable. The workbook variables are specified prior to job execution to influence the results.

URI Syntax
Code Block
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/api/variables'
Example Response


Code Block
[
{
    
{
"created": "1552379198782",
"id":
 
1,
 
"modified":
 
1552379198782,
 "
name
id": "
name1
1"
, "type": "STRING",

    "
value
modified": "
value1
1552489010718"
},

  
{"created":
 
1552379198783,
 "
id
name":
2,
 "
modified
name1"
:

 
1552379198783,
 
"name":
 
"name2",
 "type": "STRING"
,

    "value": "
value2
value1"
}
]