Versions Compared

Key

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

...

Info

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

Anchor
create_variable
create_variable
Create Variable

Request method - POST

Description

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

URI syntax

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 Variable

Request method - PUT

Description

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

URI syntax

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

Example response

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

Additional notes

Update multiple variables

URI syntax

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

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" }
]

Note

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

Anchor
delete_variable
delete_variable
Delete Variable

Request method - DELETE

Description

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

URI syntax

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.

Additional notes

Delete multiple variables

URI syntax

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

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

URI syntax

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" }

Additional notes

List all variables

URI syntax

curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/api/variables'

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"}
]