PUT api/Hosting/{hosting_handle}/User/{id}?user={user}
Update an ftp user defined by id on the given hosting
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| hosting_handle |
Hosting object handle |
string |
Required |
| id |
Id of the user to update |
decimal number |
Required |
| user |
Owner of object |
string |
Required |
Body Parameters
Body - user object with the elements to update
UserModel| Name | Description | Type | Additional 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
{
"HostingHandle": null,
"Pwd": "p@ssw0rD",
"FullName": null,
"Description": null,
"Dir": "/var/www/sites/myhost1/myuser"
}
application/xml, text/xml
<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
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
| Name | Description | Type | Additional 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
{
"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
<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>