Save User

<< Click to Display Table of Contents >>

Navigation:  Managing Syncplify.me Server! > REST API > Admin API > User Management >

Save User

Saves a user profile.

 

Request

Method

URL

POST

/smserver-default/sms.SaveUser

RAW

POST /smserver-default/sms.SaveUser HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[

       {

           "_id" : "MAZ3LIRCVVBEJBGUHATZDARGMM",

           "UserType" : "SMS",

           "Username" : "pippo",

           "RemapDomain" : "",

           "Description" : "",

           "PHType" : "V4Plus",

           "Salt" : "00FC6F12",

           "Password" : "743226cde58e9ee85f53ff8bc18cec4f92098cfc2efb2b9ca041c60e47a88062f18d69e8790454ea49b54470ab6afa9445f371b77f59d19431d447ac364e82fe",

           "PubKeys" : [],

           "Home" : {

               "MountPoint" : "/",

               "VFSItemID" : "KVFPSTBWKZHUTBHZ3RJDLK7EOA",

               "Visible" : true,

               "Permissions" : {

                   "canGetFile" : true,

                   "canPutFile" : false,

                   "canDelFile" : false,

                   "canModFile" : false,

                   "canRenFile" : false,

                   "canListDir" : true,

                   "canMakeDir" : false,

                   "canDelDir" : false,

                   "canRenDir" : false

               },

               "ImpType" : "None",

               "ImpUser" : "",

               "ImpPass" : ""

           },

           "VirtualFolders" : [],

           "AuthTypes" : [

               "Password"

           ],

           "AuthAll" : false,

           "AllowPlainFTP" : false,

           "AllowExplicitFTPS" : true,

           "AllowImplicitFTPS" : true,

           "AllowSSH" : false,

           "AllowSFTP" : true,

           "AllowForward" : false,

           "AllowWebDAV" : false,

           "AccountStatus" : "Enabled",

           "AutoEnable" : false,

           "AutoDisable" : false,

           "AllowedIPs" : [],

           "AllowedFwd" : [],

           "SpeedLimits" : [],

           "EventHandlers" : []

       }

]

Explained

Saves a user profile into the backend database. If the user's _id already exists, the profile will be overwritten, otherwise a new user object will be created. No two users can have the same username, trying to create a new user with the same username as an existing one will result in an error.

 

The minimum set of information necessary to create a new user are:

UserType: to be chosen among the user types returned by the GetConsts API.

Username: The user's username

PHType: password type (1)

Salt: salt used to make the password has unique (1)

Password: SHA-256 hash code of the user's password (1)

 

Notes:

(1) Obtained via the PassUtil API

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

{"result":[

{

       "Result" : 1

   }

],"id":772674711}

Explained

Result: 1 means the user was successfully created or updated, any value different from 1 represents an error.