Using API to create a user - Cloud

Talend Cloud APIs User Guide

Version
Cloud
Language
English (United States)
Product
Talend Cloud
Module
Talend API Designer
Talend API Tester
Talend Data Preparation
Talend Data Stewardship
Talend Management Console
Content
Design and Development > Designing APIs
Design and Development > Testing APIs
You can use the user management API to create users.

Before you begin

Ensure that the account to be used to issue API calls has the Users - Management permissions.

About this task

In this section, Talend API Tester is used to demonstrate how to issue API calls to create users.

Procedure

  1. On the Users page, generate a personal access token for your account.
  2. Open Talend API Tester in your browser and select GET from the Method list.
  3. In the field next to the Method drop-down list, enter the user management endpoint to be used: https://api.<your_environment>.cloud.talend.com/v1/management/roles/
    Your environment could be:
    • eu
    • us
    • us-west
  4. In the HEADERS area, click Add header and in the name field that is displayed, enter Authroization and in the value field, enter Bearer and your personal access token. Enter a whitespace to separate Bearer and your personal access.
  5. Click Send to issue your call to obtain the role ID(s) to be assigned to the user to be created.
    The response lists the IDs of the roles already defined for your Talend Cloud applications. Note down the ID to be assigned to the user to be created.
  6. Select POST from the Method list and in the field aside, enter the user management endpoint to be used: https://api.<your_environment>.cloud.talend.com/v1/management/users/

    Example

  7. Click Add query parameter and in the name and the value fields that are displayed, enter invite parameter and true, respectively. This row now reads like invite = true.
  8. Click Add header. In the name field that is displayed, enter Content-Type and in the value field, enter application/json.
  9. In the BODY area, enter the profile of the user to be created.

    Example

    {
    	"active": true,
    	"email": "user_email_to_receive_invitation",
    	"firstName": "string",
    	"lastName": "string",
    	"login": "string",
    	"roleIds": [
    		"role_id_retrieved_in_previous_steps"
    	]
    }

    In this example, only the required fields are used for the user creation.

    If needs be, you can add more fields:
    "password": "string",
    "phone": "string",
    "preferredLanguage": "EN",
    "timezone": "string",
    "title": "string",
    Note that a valid password must contain more than 7 characters with:
    • numbers
    • upper-case letters
    • special characters
    • none of the information from the email, the firstName, the lastName or the login fields
  10. Click Send to issue your call.

Results

The creation is accomplished successfully and the status code 201 is returned. In the BODY field of the response, the details of this created user are displayed.