Create

POST v1/users

Description

Create a user.

Normal Response Codes

201

HTTP Error Codes

400 401 403 404 409 500 503

Detail Codes

SM_auth

SM_cannot_read_object

SM_eexist

SM_invalid_arg_value

SM_invalid_path_variable

SM_invalid_query_param

SM_malformed_url

SM_missing_arg

SM_no_method_for_URL_pattern

SM_no_operation_found

SM_no_path_found

SM_reserved_username

SM_too_many

SM_unexpected_arg

SM_unexpected_child

SM_unexpected_query_param

SM_unknown

SM_version_name

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
   }
}