Users API

Create a user

POST /api/users

Parameters

Name Description
username Username
password Password - required unless LDAP authentication is enabled on the server
first_name First Name
last_name Last Name
email E-mail
title Title
dept Department
notes Notes
admin Make the user an admin. (Only allowed if the authenticated user is an admin)
user_type User type ('analytics_developer', 'data_analyst', 'collaborator', 'business_user')

Request

Headers

Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: _session_id=eUJSUDJCekgzZURBSExiR2QyUlVEN1NDUFNocXFoQlNpaHdCWGRIZ21TUVVYcGY3eVVRU0NQTzVOd2tieUlVcGtzRTM5cVVSTkxVQ0FqUEZORlljU1l1ajI2WitKSDB5a2FoaXdRRjF4K25tdWR1Y1dpNk5ObE9sY2hxaU9RZURyNzVYbEp4cW1LclZGMldFK0MzcW5NWkJxZDRhck5VMWpnaVNORTd6OFpkTmNJaDNObVZQdXNHNVo4QThBb0lqbHBHU2tlSGxkNkxhazBsQUZjRnZIVFYyNXJybjMxTU03UExpQVFobFZoRFU0anVtOGdkNU1mRDBwR0svdTFLVHREY01IZzNTQk9XekpLWk1HSWNEdkx0eWhCbDkvMXZVRmt4bkxwNUN5aDZ3M1IzZ0JNMVMrVGFYcnVkaGIvcmdqZ2tzeWtlVnhiN3pzanRSQWJaNGF5KzduTEN5U0lNTmhyVUtNcWpIcFZvZGlEOVBGR3J6SjdzS3dmWFRtU29GNy82bnBhaGJuMElZcVFXVTg0elVRVGhSS3ZuOGRxL1RMbTUxL0ZCMEpqST0tLUpEME52cE8rdmx5aVpMeFFtZWNXaXc9PQ%3D%3D--2ebce5b3cfa13d3c5058923478ba85bf294c67bd

Route

POST /api/users

Body

1
 
username=cookiemonster&password=secret&first_name=Cookie&last_name=Monster&email=cookie%40monster.com&title=Chief+Cookie+Officer&dept=jar¬es=great&user_type=analytics_developer

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"aec99e65fe00ac1ee9ca05d3239cafdb"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _session_id=cDZ5VjhvcWcrWDIrWnlkNnRkbWxvc1IrS0JSN3V0UmdNclRMNW5ENFdkWURKT0JRcWROTHBBNERQTFF0VmI2dlRMVXJlZXJZZGRLZE9wNktVQ0o4T0tYSzZjUkQrekxaclNPN1pXelZaWGN1VzI4MnduUkhldXFOTUlneTJkbGpUeUI1TlB3Y1ltcDRnaHBoUkNLeU45NWV1RytpanNOVDU4MURKMVJjMmpZQTN0YW1oUDNKQTdyY0MrcjJxdUNEQ21mdnJmZ2ZUdmVpOVZYaTF4QXl3c0F3aXN6RVk2aXd0TUhsQlRGdFFlQVJ5dHMrRXQ1eTQ1cjlTdkRoNmRWblMydFVMQVRUR3ZieWRpb1JwQk43S2tHUUFkZE9NOERMdDlQMTlVN2UzaGNQWlpZN0V6KzRBMytVdlAyYncrZHlsc1FuZFp6R3I2emJMMlg0Y1J2Y2V2eTErL1lDTzRqUlMxdmpNblZxdXJ6U0sydmFTWUpPZko5enZXL1dJKzRJNEg5MkhnM0JSMkh5YkZhYzN5OXBVaVZFaFQrUlZDYU5nRWZPa0lXSWpLcG41TVJ1WW8xNU1vcFZWQ1M2UDF1ci0tYXpwQXJpcFJlQWhMUEJOSHM2VXFqQT09--156acef4a48d1e557efb65f22056c0789006ebd9; path=/; HttpOnly
X-Request-Id: db4db965-272e-4e4c-9959-d74ed52c11c9
X-Runtime: 0.165621
Content-Length: 560

Status

201 Created

Body

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
{
  "response": {
    "id": 1000016,
    "username": "cookiemonster",
    "first_name": "Cookie",
    "last_name": "Monster",
    "image": {
      "original": "",
      "icon": "",
      "entity_type": "image",
      "complete_json": true
    },
    "is_deleted": null,
    "auth_method": "internal",
    "ldap_group_id": null,
    "user_type": "analytics_developer",
    "entity_type": "user",
    "using_default_image": false,
    "active_license": true,
    "is_siteadmin": false,
    "roles": [],
    "email": "cookie@monster.com",
    "title": "Chief Cookie Officer",
    "dept": "jar",
    "notes": "great",
    "admin": false,
    "subscribed_to_emails": true,
    "tags": [],
    "deactivated_at": null,
    "complete_json": true
  }
}