Articles in this section
Category / Section

How to Add a New User to the User Management Server Using Bold BI REST API

Published:
To add a new user to the user management server (UMS) using REST API, authenticate yourself using the API access token first. Once you are authenticated, use the API to create a new user with the necessary details.
Authentication

Please refer to this document to get the authentication token.

Authorization Header
An Authorization header is an HTTP header that contains an authentication token or credentials sent by the client to the server.
Header Name
Header Value
Authorization
Bearer <access_token>

Steps for adding a new user to the User Management Server
  1. Pass the access token generated from the token endpoint in the Authorization header.
    Authorization header included with the POST requestAuthorization header included with the POST request

  2. Create a new user using the following API endpoint.
    {base url}/api/v2.0/user/add

    METHOD
    POST
    URL/v2.0/user/add

    Post request to add a new user to user management server passing authorization headerPost request to add a new user to the user management server passing authorization header

  3. Include the following parameters in the body of the request in JSON format.

    Parameter Name

    Type

    Required

    Comments

    username

    String

    Yes

    Username of the user

    email

    String

    Yes

    This value may be required based on the user account configuration.

     

    The default value is yes.

    firstname

    String

    Yes

    First name of the user

    lastname

    String

    Optional

    Last name of the user

    password

    String

    Automatic Activation – Yes

    Email Activation - No

    Password of the user.

    Based on the activation mode, the password parameter should be passed.

  4. Note:

    Password must contain:

    1. At least 6 characters
    2. 1 uppercase
    3. 1 lowercase
    4. 1 numeric
    5. 1 special character
    Sample POST Request
    JSON data included with the POST request to add new userJSON data is included with the POST request to add a new user

  5. You will get a response message with the new user information as follows.
    {
        "api_status": true,
        "data": {
            "user_id": "fd39e677-b5c8-49c5-b139-aa75c99e9770",
            "user_name": "John",
            "email": "john@syncfusion.com",
            "first_name": "John",
            "last_name": "Soundar",
            "display_name": "John Soundar",
            "contact": "",
            "directory_type": {
                "id": 1,
                "name": "Local"
            },
            "email_verified": true,
            "user_status": "Active",
            "avatar_url": null
        },
        "status": true,
        "status_message": "User has been added and activated successfully"
    }
  6. The newly created user is visible on the UMS's users page.

    Users page in User Management Server with user detailsUsers page in User Management Server with user details
    Refer to this document to learn more about managing users in UMS.

Error Messages

These are the possible error messages you may receive from this API.

Http Status Code

Description

Error Message

401

Unauthorized

                      -

400

Bad Request

Current request is empty.

400

Bad Request

Username field is empty

406

Not Acceptable

Invalid username length

400

Bad Request

Username already exists.

400

Bad Request

Email address already exists.

400

Bad Request

Email address field is empty.

406

Not Acceptable

Invalid email address.

400

Bad Request

First name field is empty.

406

Not Acceptable

Invalid first name.

406

Not Acceptable

Invalid last name.

400

Bad Request

Password field is empty.











Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SG
Written by Sivabalan Ganesan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied