REST API - Defining a User in the Request Body
4 min
you must define the user in the request body when you are creating or updating a user you can only define one user in a single request parameters the following parameters must be specified within the user element type (required) identifies the type of artifact declare this as ""user"" name (required) the username (and login name) of the user this value is alphanumeric and must be between 4 and 255 characters displayname (required) the display name in the application that other users see firstname the user's given name lastname the user's surname groupids defines the groups in which the user is a member membership to a license group is required; membership to user groups is optional group identifiers can be obtained via the rest api list groups request docid\ qmwdv31zhjj87chqae6lj requests department the organizational department of which the user is a member title the user's job title password the password used to log in to the application this value must be between 8 and 128 characters, must contain a number, an upper case letter, and must contain at least one non alphanumeric character expiredpassword` (true/false) defines whether the user password expires if the user password is configured to never expire, any password policy configured in the instance settings will not apply conversely, if passwords are configured in instance settings to never expire, any value configured here will not apply instanceadminrole` defines which instance administrator privileges the user has by default no role is assigned enabled` determines whether the user can log in to the application fallback` \ if federated authentication is enabled, determines whether the user is allowed to fall back from federated authentication email the user's email address any required properties of the applicable artifact type properties element if you want to specify property values for your artifact, include a properties element within the artifact element if you are defining a property type for your artifact, you must specify values for required elements of the property type among others, the properties element can contain the following elements property (required ) the element of the property specifications propertytypeid the corresponding elements, which can be populated in the rest api get artifact request docid\ wkudb4wm9kw7rqoykf hk call examples addartifact example here is an example of a request body in xml format \<?xml version="1 0" ?>\<users xmlns="http //www blueprintsys com/blueprint/api/v1"> \<user> \<email>dquade2084\@dev recall com\</email> \<department>devops\</department> \<displayname>quaaade\</displayname> \<firstname>douglas\</firstname> \<lastname>quade\</lastname> \<name>dquade\</name> \<enabled>true\</enabled> \<password>@quaaade#1\</password> \<expiredpassword>false\</expiredpassword> \<groupids xmlns\ i="http //schemas microsoft com/2003/10/serialization/arrays"> \<i\ int>8\</i\ int> \</groupids> \<title>engineer\</title> \</user>\</users> here is an example of a request body in json format \[ { "type" "user", "name" "dquade", "displayname" "quaaade", "firstname" "douglas", "lastname" "quade", "groupids" \[ "1", "8", "12" ], "title" "engineer", "department" "devops", "password" "#fr33m4r5", "enabled" true, "email" "dquade2084\@dev recall com" }]