POST api/Hosting/{hosting_handle}/User?user={user}

Create a new ftp user on the given hosting

Request Information

URI Parameters

NameDescriptionTypeAdditional information
hosting_handle

Hosting object handle

string

Required

user

Owner of object

string

Required

Body Parameters

Body - the user to create

UserModel
NameDescriptionTypeAdditional information
HostingHandle

Hosting hanlde

string

None.

Pwd

Password must have at least one alpha character, one numeric character, special character and a length between 6 and 20

string

Required

Matching regular expression pattern: ^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[é'(\-è_çà)=#{\[|\\@\]}$ù*,;:!£%µ?./§¤])[0-9a-zA-Zé'(\-è_çà)=#{\[|\\@\]}$ù*,;:!£%µ?./§¤]{6,20}$

Max length: 20

Min length: 6

FullName

User full name

string

None.

Description

string

None.

Dir

string

None.

Request Formats

application/json, text/json

Sample:
{
  "HostingHandle": null,
  "Pwd": "p@ssw0rD",
  "FullName": null,
  "Description": null,
  "Dir": "/var/www/sites/myhost1/myuser"
}

application/xml, text/xml

Sample:
<UserModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <Description i:nil="true" />
  <Dir>/var/www/sites/myhost1/myuser</Dir>
  <FullName i:nil="true" />
  <HostingHandle i:nil="true" />
  <Pwd>p@ssw0rD</Pwd>
</UserModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

A user object on success
Collection of errors on failure
Return codes
200 - ok
300 - Ambiguous
401 - unauthorized
404 - not found
500 - internal server error
513 - quota exceeded
530 - invalid attribute value

User
NameDescriptionTypeAdditional information
Id

User id

decimal number

None.

HostingHandle

Hosting handle

string

None.

Host

Ftp host

string

None.

UserName

Ftp user name - for windows this is different to Login

string

None.

Login

User login

string

None.

Pwd

string

None.

FullName

User full name

string

None.

Description

string

None.

Dir

string

None.

Uid

integer

None.

Gid

integer

None.

DateCre

Date created

date

None.

Etat

Status

integer

None.

IsParent

boolean

None.

IsFpUser

boolean

None.

IsUnixUser

boolean

None.

IsFtpUser

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 0.0,
  "HostingHandle": null,
  "Host": null,
  "UserName": null,
  "Login": "myuser",
  "Pwd": null,
  "FullName": null,
  "Description": "Utilisateur FTP",
  "Dir": "/var/www/sites/myhost1/myuser",
  "Uid": 0,
  "Gid": 0,
  "DateCre": "0001-01-01T00:00:00",
  "Etat": 0,
  "IsParent": false,
  "IsFpUser": false,
  "IsUnixUser": false,
  "IsFtpUser": false
}

application/xml, text/xml

Sample:
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
  <DateCre>0001-01-01T00:00:00</DateCre>
  <Description>Utilisateur FTP</Description>
  <Dir>/var/www/sites/myhost1/myuser</Dir>
  <Etat>0</Etat>
  <FullName i:nil="true" />
  <Gid>0</Gid>
  <Host i:nil="true" />
  <HostingHandle i:nil="true" />
  <Id>0</Id>
  <IsFpUser>false</IsFpUser>
  <IsFtpUser>false</IsFtpUser>
  <IsParent>false</IsParent>
  <IsUnixUser>false</IsUnixUser>
  <Login>myuser</Login>
  <Pwd i:nil="true" />
  <Uid>0</Uid>
  <UserName i:nil="true" />
</User>