REST API - Defining a User in the Request Body

Updated by Stefenie Stockbridge

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 List Groups 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 Get Artifact 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"
}
]


How did we do?