REST API Reference Version 4.4.0.0Search

Create

POST v1/users

Description

Create a user.

Normal Response Codes

201

HTTP Error Codes

400 401 403 404 409 500 503

Request

Parameter Type JSON Type Description Default Mandatory Deprecated
name NsCliUserName string Name of the user. String of up to 32 alphanumeric characters, beginning with a letter, which matches the CLI requirements for a user name. Example: 'user1'.   true  
description NsDescription string Description of the user. String of up to 255 printable ASCII characters. Example: '99.9999% availability'. '' false  
role NsUserRoles string enum Role of the user. Possible values: 'administrator', 'poweruser', 'operator', 'guest'. 'guest' false  
password NsPassword string User's login password. String of 8 to 255 printable characters excluding ampersand and ;[]`. Example: 'password-91'.   true  
inactivity_timeout NsSeconds number The amount of time that the user session is inactive before timing out. A value of 0 indicates that the timeout is taken from the group setting. Unsigned 64-bit integer. Example: '1234'. 0 false  
full_name NsFullName string Fully qualified name of the user. Alphanumeric string of up to 64 chars, starts with letter, can include space, apostrophe('), hyphen(-). Example: 'User-13 Peterson'. '' false  
email_addr NsEmail string Email address of the user. Case insensitive email address. Example: bob@wikipedia.com. '' false  
disabled NsBoolean boolean User is currently disabled. Possible values: 'true', 'false'. 'false' false  

JSON Request

            

{
   "data" : {
      "password" : "aaaaaaaa",
      "name" : "user830874798",
      "description" : "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-345",
      "full_name" : "user830874798"
   }
}

        
         

Response

Parameter Type JSON Type Description Deprecated
id NsObjectID string Identifier for the user. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
name NsCliUserName string Name of the user. String of up to 32 alphanumeric characters, beginning with a letter, which matches the CLI requirements for a user name. Example: 'user1'.  
search_name NsSearchName string Name of the user used for object search. Alphanumeric string, up to 64 characters including hyphen, period, colon. Example: 'vol:1'.  
description NsDescription string Description of the user. String of up to 255 printable ASCII characters. Example: '99.9999% availability'.  
role_id NsObjectID string Identifier for the user's role. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
role NsUserRoles string enum Role of the user. Possible values: 'administrator', 'poweruser', 'operator', 'guest'.  
inactivity_timeout NsSeconds number The amount of time that the user session is inactive before timing out. A value of 0 indicates that the timeout is taken from the group setting. Unsigned 64-bit integer. Example: '1234'.  
creation_time NsTime number Time when this user was created. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
last_modified NsTime number Time when this user was last modified. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
full_name NsFullName string Fully qualified name of the user. Alphanumeric string of up to 64 chars, starts with letter, can include space, apostrophe('), hyphen(-). Example: 'User-13 Peterson'.  
email_addr NsEmail string Email address of the user. Case insensitive email address. Example: bob@wikipedia.com.  
disabled NsBoolean boolean User is currently disabled. Possible values: 'true', 'false'.  
last_login NsTime number Last login time. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
last_logout NsTime number Last logout time. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
logged_in NsBoolean boolean User is currently logged in. Possible values: 'true', 'false'.  

JSON Response

            

{
   "data" : {
      "last_login" : 0,
      "disabled" : false,
      "inactivity_timeout" : 0,
      "search_name" : "user830874798 (user830874798)",
      "name" : "user830874798",
      "last_modified" : 1426801984,
      "logged_in" : false,
      "full_name" : "user830874798",
      "description" : "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-345",
      "role_id" : "1500000000000004d3000000000000000000000004",
      "creation_time" : 1426801984,
      "email_addr" : "",
      "id" : "1000000000000004d3000000000000000000000007",
      "role" : "guest",
      "last_logout" : 0
   }
}