REST API User Management

For each call, you can add the following command:

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

After the username and password in order to receive more meaningful HTTP errors.

View All User Management REST API

Request method - OPTIONS

Description

Returns an HTTP response in JSON representation with all information on available REST APIs for user management. Use this representation to understand the different commands you can execute for user management. Each REST API listed contains the path, method, and required parameters. You can use the REST APIs in this representation to change what is returned for the other calls in user management.

URI syntax

curl -u '<username>:<password>' -X OPTIONS http://<Datameer-serverIP>:<port-number>/rest/user-management?pretty

Example response

 Click here to expand...
[
  {
    "addInternalGroup": {
      "path": "/rest/user-management/groups",
      "method": "POST",
      "params": [],
      "fields": [
        {
          "name": "name",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "deleteInternalGroup": {
      "path": "/rest/user-management/groups/{name}",
      "pathVariables": [
        "name"
      ],
      "method": "DELETE",
      "params": [],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findInternalGroups": {
      "path": "/rest/user-management/groups",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "name",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "updateInternalGroup": {
      "path": "/rest/user-management/groups/{name}",
      "pathVariables": [
        "name"
      ],
      "method": "PUT",
      "params": [],
      "fields": [
        {
          "name": "name",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "modifyInternalGroups": {
      "path": "/rest/user-management/groups",
      "method": "PUT",
      "params": [],
      "fields": [
        {
          "name": "affectedGroup",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255
          }
        },
        {
          "name": "delete",
          "required": false,
          "type": {
            "name": "boolean"
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "addRole": {
      "path": "/rest/user-management/roles",
      "method": "POST",
      "params": [],
      "fields": [
        {
          "name": "name",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255
          }
        },
        {
          "name": "capabilities",
          "required": true,
          "type": {
            "name": "list",
            "min": 1,
            "max": 2147483647
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "deleteRole": {
      "path": "/rest/user-management/roles/{name}",
      "pathVariables": [
        "name"
      ],
      "method": "DELETE",
      "params": [],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findRoles": {
      "path": "/rest/user-management/roles",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "capabilities",
          "sortable": false
        },
        {
          "name": "name",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "updateRole": {
      "path": "/rest/user-management/roles/{name}",
      "pathVariables": [
        "name"
      ],
      "method": "PUT",
      "params": [],
      "fields": [
        {
          "name": "name",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255
          }
        },
        {
          "name": "capabilities",
          "required": false,
          "type": {
            "name": "list",
            "min": 1,
            "max": 2147483647
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "addInternalUser": {
      "path": "/rest/user-management/users",
      "method": "POST",
      "params": [
        {
          "name": "notifyPerMail",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "username",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/^[\\p{L}\\d_\\.+@~\\-\\(\\)]+(([ ]+[\\p{L}\\d_\\.+@~\\-\\(\\)]+)+)?$/"
          }
        },
        {
          "name": "email",
          "required": true,
          "type": {
            "name": "email"
          }
        },
        {
          "name": "roles",
          "required": true,
          "type": {
            "name": "list",
            "min": 1,
            "max": 2147483647
          }
        },
        {
          "name": "additionalInformation",
          "required": false,
          "type": {
            "name": "text",
            "min": 0,
            "max": 4096
          }
        },
        {
          "name": "enabled",
          "required": false,
          "type": {
            "name": "boolean"
          }
        },
        {
          "name": "expires",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/\\d{4}-\\d{2}-\\d{2}/"
          }
        },
        {
          "name": "groups",
          "required": false,
          "type": {
            "name": "list",
            "min": 0,
            "max": 2147483647
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "deleteInternalUser": {
      "path": "/rest/user-management/users/{username}",
      "pathVariables": [
        "username"
      ],
      "method": "DELETE",
      "params": [],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findInternalUsers": {
      "path": "/rest/user-management/users",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        },
        {
          "name": "role",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        },
        {
          "name": "lastLoginDate",
          "sortable": true
        },
        {
          "name": "loginCount",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findInternalUserByName": {
      "path": "/rest/user-management/users/{username}",
      "pathVariables": [
        "username"
      ],
      "method": "GET",
      "params": [],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        },
        {
          "name": "lastLoginDate",
          "sortable": true
        },
        {
          "name": "loginCount",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "updateInternalUserPassword": {
      "path": "/rest/user-management/password/{username}",
      "pathVariables": [
        "username"
      ],
      "method": "PUT",
      "params": [
        {
          "name": "notifyPerMail",
          "required": false
        }
      ],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  },
  {
    "updateInternalUser": {
      "path": "/rest/user-management/users/{username}",
      "pathVariables": [
        "username"
      ],
      "method": "PUT",
      "params": [
        {
          "name": "notifyPerMail",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "email",
          "required": false,
          "type": {
            "name": "email"
          }
        },
        {
          "name": "additionalInformation",
          "required": false,
          "type": {
            "name": "text",
            "min": 0,
            "max": 4096
          }
        },
        {
          "name": "enabled",
          "required": false,
          "type": {
            "name": "boolean"
          }
        },
        {
          "name": "expires",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/\\d{4}-\\d{2}-\\d{2}/"
          }
        },
        {
          "name": "groups",
          "required": false,
          "type": {
            "name": "list",
            "min": 0,
            "max": 2147483647
          }
        },
        {
          "name": "roles",
          "required": false,
          "type": {
            "name": "list",
            "min": 1,
            "max": 2147483647
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "updateInternalUsers": {
      "path": "/rest/user-management/users",
      "method": "PUT",
      "params": [],
      "fields": [
        {
          "name": "affectedUser",
          "required": true,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/^[\\p{L}\\d_\\.+@~\\-\\(\\)]+(([ ]+[\\p{L}\\d_\\.+@~\\-\\(\\)]+)+)?$/"
          }
        },
        {
          "name": "additionalInformation",
          "required": false,
          "type": {
            "name": "text",
            "min": 0,
            "max": 4096
          }
        },
        {
          "name": "delete",
          "required": false,
          "type": {
            "name": "boolean"
          }
        },
        {
          "name": "email",
          "required": false,
          "type": {
            "name": "email"
          }
        },
        {
          "name": "enabled",
          "required": false,
          "type": {
            "name": "boolean"
          }
        },
        {
          "name": "expires",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/\\d{4}-\\d{2}-\\d{2}/"
          }
        },
        {
          "name": "groups",
          "required": false,
          "type": {
            "name": "list",
            "min": 0,
            "max": 2147483647
          }
        },
        {
          "name": "roles",
          "required": false,
          "type": {
            "name": "list",
            "min": 1,
            "max": 2147483647
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findAuthenticableUsers": {
      "path": "/rest/user-management/authenticable-users",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "role",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findShareableGroups": {
      "path": "/rest/user-management/shareable-groups",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "name",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findAvailableUsers": {
      "path": "/rest/user-management/available-users",
      "method": "GET",
      "params": [
        {
          "name": "group",
          "required": false
        },
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        },
        {
          "name": "lastLoginDate",
          "sortable": true
        },
        {
          "name": "loginCount",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findAuthenticatorUsers": {
      "path": "/rest/user-management/authenticator/users",
      "method": "GET",
      "params": [
        {
          "name": "firstResult",
          "required": false
        },
        {
          "name": "maxResults",
          "required": false
        },
        {
          "name": "sortBy",
          "required": false
        },
        {
          "name": "sortDir",
          "required": false
        },
        {
          "name": "term",
          "required": false
        },
        {
          "name": "fields",
          "required": false
        },
        {
          "name": "pretty",
          "required": false
        },
        {
          "name": "role",
          "required": false
        }
      ],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "authenticableGroups",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "importedUser",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findAuthenticatorUserByName": {
      "path": "/rest/user-management/authenticator/users/{username}",
      "pathVariables": [
        "username"
      ],
      "method": "GET",
      "params": [],
      "fields": [
        {
          "name": "additionalInformation",
          "sortable": false
        },
        {
          "name": "authenticableGroups",
          "sortable": false
        },
        {
          "name": "email",
          "sortable": true
        },
        {
          "name": "enabled",
          "sortable": true
        },
        {
          "name": "expires",
          "sortable": true
        },
        {
          "name": "groups",
          "sortable": false
        },
        {
          "name": "importedUser",
          "sortable": false
        },
        {
          "name": "roles",
          "sortable": false
        },
        {
          "name": "username",
          "sortable": true
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "overrideOwnEmailAndPassword": {
      "path": "/rest/user-management/logged-in-user",
      "method": "PUT",
      "params": [],
      "fields": [
        {
          "name": "email",
          "required": false,
          "type": {
            "name": "email"
          }
        },
        {
          "name": "currentPassword",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/[^\\s]+/m"
          }
        },
        {
          "name": "newPassword",
          "required": false,
          "type": {
            "name": "text",
            "min": 1,
            "max": 255,
            "regex": "/[^\\s]+/m"
          }
        }
      ]
    },
    "datameerVersion": "6.0.0"
  },
  {
    "findCapabilities": {
      "path": "/rest/user-management/capabilities",
      "method": "GET",
      "params": [
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  },
  {
    "loggedInUser": {
      "path": "/rest/user-management/logged-in-user",
      "method": "GET",
      "params": [
        {
          "name": "pretty",
          "required": false
        }
      ],
      "fields": []
    },
    "datameerVersion": "6.0.0"
  }

List All Groups

Request method - GET

Description

Returns a list of all the created group names in Datameer.

URI syntax

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/groups

Example response

{
    "name": "datameer"
  },
  {
    "name": "group 1"
  },
  {
    "name": "group 2"
  },
  {
    "name": "group 3"
  },
  {
    "name": "Shark Team"
  },
  {
    "name": "Special Team"
  }

List All Roles

Request method - GET

Description

Returns a list of all the created role names in Datameer.

URI syntax

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/roles

Example response

{
"name": "ADMIN"
},
{
"name": "ANALYST"
},
{
"name": "App Operator"
},
{
"name": "News"
},
{
"name": "Illustrator"
},
{
"name": "ANALYST2"
},
{
"name": "ANALYST3"
},
{
"name": "VARIABLES_EDIT"
},
{
"name": "VARIABLES_READ"
}

List All Users

Request method - GET

Description

Returns a list of all the users and their information including Datameer version, user name, email address, active/inactive, expiration date, group(s), and role(s). The information you see is configurable as per View all user management REST API. You can also return the information for a specified user.

URI syntax

One user:

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/users/<user name>

First page of (ten) users:

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/users/

To see the next page of users:

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/users?firstResult=11

To increase the number of users per page, change the results value:

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/users?maxResults=50

Example response

One user:

{
"username": "Frank",
"email": "Frank@email.com",
"additionalInformation": "",
"enabled": true,
"expires": "",
"groups": [],
"roles": ["ANALYST"],
"lastLoginDate": "",
"loginCount": 0,
"datameerVersion":"5.11.0"
}

All users:

{
  "firstResult": 0,
  "maxResults": 10,
  "total": 3,
  "elements": [
    {
      "username": "admin",
      "_links": {
        "self": {
          "href": "/rest/user-management/users/admin"
        },
        "delete": {
          "method": "DELETE",
          "permitted": false,
          "href": "/rest/user-management/users/admin"
        },
        "modify": {
          "method": "PUT",
          "permitted": true,
          "href": "/rest/user-management/users/admin"
        }
      }
    },
    {
      "username": "analyst",
      "_links": {
        "self": {
          "href": "/rest/user-management/users/analyst"
        },
        "delete": {
          "method": "DELETE",
          "permitted": true,
          "href": "/rest/user-management/users/analyst"
        },
        "modify": {
          "method": "PUT",
          "permitted": true,
          "href": "/rest/user-management/users/analyst"
        }
      }
    },
    {
      "username": "colin",
      "_links": {
        "self": {
          "href": "/rest/user-management/users/colin"
        },
        "delete": {
          "method": "DELETE",
          "permitted": true,
          "href": "/rest/user-management/users/colin"
        },
        "modify": {
          "method": "PUT",
          "permitted": true,
          "href": "/rest/user-management/users/colin"
        }
      }
    }
  ],
  "datameerVersion": "5.11.0"
}

Logged In User Account Information

Request method - GET

Description

Returns account information about a specific Datameer user.

URI syntax

curl -u '<username>:<password>' -X GET http://<Datameer-serverIP>:<port-number>/rest/user-management/logged-in-user?pretty

Example response

{
  "username": "admin",
  "email": "admin@localhost",
  "additionalInformation": "",
  "enabled": true,
  "expires": "",
  "groups": [IT-Dept.],
  "roles": ["ADMIN"],
  "capabilities": ["HADOOP_CLUSTER_ACCESS","EXPORTJOB_EDIT"],
  "internal": false,
  "lastLoginDate": "",
  "loginCount": 0
}

Returns capabilities of a user as defined in User Roles.

 List of user capabilities:

ACCESS_TOKEN_CREATE - Allows to create access tokens for every user via REST API.

ADMINISTRATION_ACCESS - Allows access to the administration pages.

APP_MARKET_ACCESS - Allows access to the analytics application market.

ARCHIVE_PROJECT - Allows members of this role to create backups and restore entires projects.

CLUSTER_HEALTH_ACCESS - Allows access to the cluster health page.

CONNECTION_ACCESS - Allows to read connections.

CONNECTION_EDIT - Allows to create and write connections.

DATABASE_DRIVERS_ACCESS - Allows to administrate database drivers.

DATALINK_ACCESS - Allows to read data links.

DATALINK_EDIT - Allows to create, write, delete, and execute data links.

EMAIL_NOTIFICATION_SETUP - Allows to setup email notifications for job configurations.

EXPORTJOB_ACCESS - Allows to read export jobs.

EXPORTJOB_EDIT - Allows to create, write, and delete export jobs.

EXPORTJOB_EXECUTE - Allows to run export jobs.

FILEUPLOAD_ACCESS - Allows to read file uploads.

FILEUPLOAD_EDIT - Allows to create, write, and delete file uploads.

FILE_BROWSER_ACCESS - Allows access to the file browser

FOLDER_BACKUP - Allows members of this role to create a backup of a folder and download as a zip file.

FOLDER_CREATE - Allows to create folders or move existing folders into other folders.

FOLDER_CREATE_IN_HOME - Allows to create folders in the own home folder or move existing folders into another.

FOLDER_RESTORE - Allows members of this role to restore a folder form a zip file.

FOREIGN_ROLES_ACCESS - Allows access to roles the user does not belong to.

GROUPS_ACCESS - Allows access and modification of groups.

HADOOP_CLUSTER_ACCESS - Allows to administration the Hadoop cluster.

HADOOP_PROPERTIES_EDIT - Allows to configure Hadoop properties of job executions.

IMPORTJOB_ACCESS - Allows to read import jobs.

IMPORTJOB_DOWNLOAD - Allow to download import jobs result data.

IMPORTJOB_EDIT - Allows to create, write, and delete import jobs.

IMPORTJOB_EXECUTE - Allows to run import jobs.

INFOGRAPHICS_ACCESS - Allows to read infographics.

INFOGRAPHICS_EDIT - Allows to create, write, and delete infographics.

INFOGRAPHICS_SHARE_PUBLIC - Allows to publish infographics (read access to everyone).

JOB_DETAILS_ACCESS - Allows the user to access the common job details page.

JOB_HISTORY_ACCESS - Allows access to the job history page.

LICENSE_ACCESS - Allows access to the license page.

LICENSE_BUY_OR_ACTIVATE - Allows access to activate a license.

LICENSE_INFORMATION_ACCESS - Allows access to the license statistics.

LICENSE_UPLOAD - Allows to install a license.

MAIL_SERVER_ACCESS - Allows to administrate the mail server.

PLUGINS_ACCESS - Allows to view plug-ins.

PLUGINS_EDIT - Allows to administrate plug-ins.

ROLES_ACCESS - Allows to access roles.

ROLES_EDIT - Allows to create, update, and delete roles.

SHARE_WITH_FOREIGN_GROUPS_ACCESS - Allows to share with groups the user does not belong to.

SHARE_WITH_OTHERS_ACCESS - Allows to share with Others.

SYSTEM_DASHBOARD_ACCESS - Allows access to the system dashboard.

USERS_ACCESS - Allows access to users.

USERS_EDIT - Allows to create, update, and delete users.

USER_CAN_ACCESS_EVERYTHING - Allows to see every file or folder in the file system.

USER_CAN_EDIT_EVERYTHING - Allows to edit everything in the file system, including permissions, group sharing options, and ownership.

USER_MANAGEMENT_ACCESS - Bundles all user-related capabilities.

WORKBOOK_ACCESS - Allows to read workbooks.

WORKBOOK_DOWNLOAD - Allows to download workbook results data.

WORKBOOK_EDIT - Allows to create, write, and delete workbooks.

WORKBOOK_EXECUTE - Allows to run workbooks.

Create a User

Request method - POST

Description

Creates an internal user in Datameer.

URI syntax

curl -u '<username>:<password>' -d '{username:"<user name>", email:"<user's email address>", roles : [<role>]}' -X POST http://<Datameer-serverIP>:<port-number>/rest/user-management/users

Example response

{
  "version": "3.1",
  "username": "Robert",
  "email": "Robert@email.com",
  "enabled": true,
  "expires": "",
  "groups": [],
  "roles": [
    "ANALYST"
  ]
}

Additional notes

  • Optional parameter
    • notifyPerMail=true (sends an account creation email to user)
  • Mandatory fields:
    • username:"<username>"
    • email:"<email>"
    • roles: [<role_1>,...,<role_N>] > each role must exist
  • Optional fields:
    • groups:[<group_1>,..., <group_N>] > each group must exist
    • enabled:<true|false>
    • expires:"<yyyy-MM-dd>"
    • version:"<version>"

Import a User from External  Authenticator

Request method - POST

Description

Adds a user in Datameer taken from a 3rd party authenticator.

URI syntax

curl -u '<username>:<password>' -d '{username:"<user name>", roles:[<role>]}' -X POST http://<Datameer-serverIP>:<port-number>/rest/user-management/users

Example response

{
  "version": "3.1",
  "username": "Joel",
  "email": "Joel@email.com",
  "enabled": true,
  "expires": "",
  "groups": [
    "datameer"
  ],
  "roles": [
    "ANALYST"
  ]
}

Additional notes

  • Mandatory fields:
    • username:"<username>"
    • roles: [<role_1>,...,<role_N>] > each role must exist
  • Optional fields:
    • enabled:<true|false>
    • version:"<version>"
  • Not supported fields:
    • email
    • groups
    • expires

Update a User

Request method - PUT

Description

Updates a Datameer user's account.

URI syntax

curl -u '<username>:<password>'-d '{version:"<version number>", email:"<user's email address>", roles : [<role>]}' -X PUT http://<Datameer-serverIP>:<port-number>/rest/user-management/users/<user name>

Example response

{
"version": "3.1",
"username": "Robert",
"email": "RobertSmith@email.com",
"enabled": true,
"expires": "",
"groups": [],
"roles": [
"ANALYST"
]
}

Additional notes

  • Optional fields:
    • roles: [<role_1>,...,<role_N>] > each role must exist
    • enabled:<true|false>
    • groups:[<group_1>,..., <group_N>] > each group must exist
    • expires:"<yyyy-MM-dd>"
  • Not supported fields:
    • username:"<username>"> username can never be changed

Update a User Imported From an External Authenticator

Request method - PUT

Description

Updates a Datameer user's account who authenticates from a 3rd party authenticator. 

URI syntax

curl -u '<username>:<password>' -d '{roles : [<role>]}' -X PUT http://<Datameer-serverIP>:<port-number>/rest/user-management/users/<user name>

Example response

{
  "version": "3.1",
  "username": "Joel",
  "email": "Joel@email.com",
  "enabled": true,
  "expires": "",
  "groups": [
    "datameer"
  ],
  "roles": [
    "ANALYST"
  ]
}

Additional notes

  • Optional fields:
    • enabled:<true|false>
    • roles: [<role_1>,...,<role_N>] > each role must exist
  • Not supported fields
    • email
    • groups
    • expires

Delete a User

Request method - DELETE

Description

Deletes a user from Datameer.

URI syntax

curl -u '<username>:<password>' -X DELETE http://<Datameer-serverIP>:<port-number>/rest/user-management/users/<user name>

Example response

No confirmation/response

Set or Update Password to Existing User

Request method - PUT

Description

Sets or updates a user password.

URI syntax

curl -u '<username>:<password>'-d '<passowrd>' -X PUT http://<Datameer-serverIP>:<port-number>/rest/user-management/password/<user name>

Example response

No confirmation/response

Send Notification When Setting or Updating a Password

Request method - PUT

Description

Sets or updates a user password. Sends a notification email to the user they password had been updated. 

URI syntax

curl -u '<username>:<password>'-d '<password>' -X PUT http://<Datameer-serverIP>:<port-number>/rest/user-management/password/<user name>?notifyPerMail=true

Example response

No confirmation/response

Send Notification When Creating a User

Request method - POST

Description

Creates a Datameer user and emails the user a notification the account has been made.

URI syntax

curl -u '<username>:<password>' -d '{version:"<version number>", username:"<user name>", email:"<user's email>", roles : [<role>]}' -X POST http://<Datameer-serverIP>:<port-number>/rest/user-management/users?notifyPerMail=true

Example response 

{
"version": "3.1",
"username": "RobertSmith",
"email": "RobertSmith@email.com",
"enabled": true,
"expires": "",
"groups": [],
"roles": [
"ANALYST"
]
}

Create a Role

Request method - POST

Description

Creates an internal role in Datameer. 

URI syntax

curl -u '<username>:<password>'-X POST -d"{name:"test",capabilities:[list capabilities]}" http://<Datameer-serverIP>:<port-number>/rest/user-management/roles/
 List of role capabilities:

ACCESS_TOKEN_CREATE - Allows to create access tokens for every user via REST API.

ADMINISTRATION_ACCESS - Allows access to the administration pages.

APP_MARKET_ACCESS - Allows access to the analytics application market.

ARCHIVE_PROJECT - Allows members of this role to create backups and restore entires projects.

CLUSTER_HEALTH_ACCESS - Allows access to the cluster health page.

CONNECTION_ACCESS - Allows to read connections.

CONNECTION_EDIT - Allows to create and write connections.

DATABASE_DRIVERS_ACCESS - Allows to administrate database drivers.

DATALINK_ACCESS - Allows to read data links.

DATALINK_EDIT - Allows to create, write, delete, and execute data links.

EMAIL_NOTIFICATION_SETUP - Allows to setup email notifications for job configurations.

EXPORTJOB_ACCESS - Allows to read export jobs.

EXPORTJOB_EDIT - Allows to create, write, and delete export jobs.

EXPORTJOB_EXECUTE - Allows to run export jobs.

FILEUPLOAD_ACCESS - Allows to read file uploads.

FILEUPLOAD_EDIT - Allows to create, write, and delete file uploads.

FILE_BROWSER_ACCESS - Allows access to the file browser

FOLDER_BACKUP - Allows members of this role to create a backup of a folder and download as a zip file.

FOLDER_CREATE - Allows to create folders or move existing folders into other folders.

FOLDER_CREATE_IN_HOME - Allows to create folders in the own home folder or move existing folders into another.

FOLDER_RESTORE - Allows members of this role to restore a folder form a zip file.

FOREIGN_ROLES_ACCESS - Allows access to roles the user does not belong to.

GROUPS_ACCESS - Allows access and modification of groups.

HADOOP_CLUSTER_ACCESS - Allows to administration the Hadoop cluster.

HADOOP_PROPERTIES_EDIT - Allows to configure Hadoop properties of job executions.

IMPORTJOB_ACCESS - Allows to read import jobs.

IMPORTJOB_DOWNLOAD - Allow to download import jobs result data.

IMPORTJOB_EDIT - Allows to create, write, and delete import jobs.

IMPORTJOB_EXECUTE - Allows to run import jobs.

INFOGRAPHICS_ACCESS - Allows to read infographics.

INFOGRAPHICS_EDIT - Allows to create, write, and delete infographics.

INFOGRAPHICS_SHARE_PUBLIC - Allows to publish infographics (read access to everyone).

JOB_DETAILS_ACCESS - Allows the user to access the common job details page.

JOB_HISTORY_ACCESS - Allows access to the job history page.

LICENSE_ACCESS - Allows access to the license page.

LICENSE_BUY_OR_ACTIVATE - Allows access to activate a license.

LICENSE_INFORMATION_ACCESS - Allows access to the license statistics.

LICENSE_UPLOAD - Allows to install a license.

MAIL_SERVER_ACCESS - Allows to administrate the mail server.

PLUGINS_ACCESS - Allows to view plug-ins.

PLUGINS_EDIT - Allows to administrate plug-ins.

ROLES_ACCESS - Allows to access roles.

ROLES_EDIT - Allows to create, update, and delete roles.

SHARE_WITH_FOREIGN_GROUPS_ACCESS - Allows to share with groups the user does not belong to.

SHARE_WITH_OTHERS_ACCESS - Allows to share with Others.

SYSTEM_DASHBOARD_ACCESS - Allows access to the system dashboard.

USERS_ACCESS - Allows access to users.

USERS_EDIT - Allows to create, update, and delete users.

USER_CAN_ACCESS_EVERYTHING - Allows to see every file or folder in the file system.

USER_CAN_EDIT_EVERYTHING - Allows to edit everything in the file system, including permissions, group sharing options, and ownership.

USER_MANAGEMENT_ACCESS - Bundles all user-related capabilities.

WORKBOOK_ACCESS - Allows to read workbooks.

WORKBOOK_DOWNLOAD - Allows to download workbook results data.

WORKBOOK_EDIT - Allows to create, write, and delete workbooks.

WORKBOOK_EXECUTE - Allows to run workbooks.

Example response

{"name":"test",
"capabilities":["USERS_ACCESS","USER_MANAGEMENT_ACCESS","ADMINISTRATION_ACCESS"],
"datameerVersion":"6.1.0"}

Delete a Role

Request method - DELETE

Description

Deletes an internal role in Datameer.

URI syntax

curl -u '<username>:<password>'-X DELETE http://<Datameer-serverIP>:<port-number>/rest/user-management/roles/<role-name>

Example response

No confirmation/response

Update a Role

Request method - PUT

Description

Updates an internal role in Datameer.

URI syntax

curl -u '<username>:<password>'-X PUT -d "{name:"name",capabilities:[capabilties]}" http://<Datameer-serverIP>:<port-number>/rest/user-management/roles/<role-name>

Example response

{"name":"tests",
"capabilities["WORKBOOK_DOWNLOAD","EXPORTJOB_EXECUTE","EXPORTJOB_ACCESS","IMPORTJOB_ACCESS","WORKBOOK_EXECUTE","SHARE_WITH_FOREIGN_GROUPS_ACCESS","CONNECTION_ACCESS","FOLDER_CREATE","ARCHIVE_PROJECT","FOLDER_CREATE_IN_HOME","IMPORTJOB_EXECUTE","FILEUPLOAD_EDIT","INFOGRAPHICS_SHARE_PUBLIC","FILE_BROWSER_ACCESS","WORKBOOK_ACCESS","FOLDER_BACKUP","DATALINK_ACCESS","FILEUPLOAD_ACCESS","EXPORTJOB_EDIT","IMPORTJOB_EDIT","INFOGRAPHICS_ACCESS","SHARE_WITH_OTHERS_ACCESS","CONNECTION_EDIT","IMPORTJOB_DOWNLOAD","WORKBOOK_EDIT","USER_CAN_ACCESS_EVERYTHING","USER_CAN_EDIT_EVERYTHING","DATALINK_EDIT","FOLDER_RESTORE","INFOGRAPHICS_EDIT"]

Create a Group

Request method - POST

Description

Creates an internal group in Datameer.

This REST API call is only available if you use an internal authenticator or a mixed-mode authenticator. This call doesn't work if you use LDAP or SAML authentication and the internal authenticator is disabled.

URI syntax

curl -u '<username>:<password>'-X POST -d '{name:"group"}' http://<Datameer-serverIP>:<port-number>/rest/user-management/groups/

Example response

{"name":"testgroup",
"datameerVersion":"6.1.0"}

Delete a Group

Request method - DELETE

Description

Deletes an internal group in Datameer.

This REST API call is only available if you use an internal authenticator or a mixed-mode authenticator. This call doesn't work if you use LDAP or SAML authentication and the internal authenticator is disabled.

URI syntax

curl -u '<username>:<password>'-X DELETE http://<Datameer-serverIP>:<port-number>/rest/user-management/groups/<group-name>

Example response

No confirmation/response

Update a Group

Request method - PUT

Description

Updates an internal group in Datameer.

This REST API call is only available if you use an internal authenticator or a mixed-mode authenticator. This call doesn't work if you use LDAP or SAML authentication and the internal authenticator is disabled.

URI syntax

curl -u '<username>:<password>'-X PUT -d '{name:"group"}' http://<Datameer-serverIP>:<port-number>/rest/user-management/groups/<group-name>

Example response

{"name":"group",
"datameerVersion":"6.1.0"}

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