POST api/Account/ChangePassword
Change password for existing user
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeHttpResponseException |
Thrown if new password is not complex enough or if old password is not valid |
Examples
Change password using a jQuery ajax call
var arg = {
TicketId : "71137607-4587-44C9-BE92-A699180E42C9",
OldPassword : "MyOldPassword#",
NewPassword : "MyNewPassword#
}
$.ajax({
url: 'https://api.infocare.com/api/Account/ChangePassword',
data: JSON.stringify(arg),
type: "POST",
contentType: "application/json;charset=utf-8"
})
Request Information
URI Parameters
None.
Body Parameters
You have to specify both old and new password.
ChangePasswordArgumentModel| Name | Description | Type | Additional information |
|---|---|---|---|
| OldPassword |
Get or set old password. The old password will be verified against the ticket contained in BaseArgumentModel |
string |
None. |
| NewPassword |
Get or set new passwword |
string |
None. |
| TicketId |
Gets or sets the ticket id |
string |
None. |
| Culture |
Gets or sets culture, if not specified we will use culture set on user. |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"OldPassword": "sample string 1",
"NewPassword": "sample string 2",
"TicketId": "sample string 3",
"Culture": "sample string 4"
}
application/xml, text/xml
Sample:
<ChangePasswordArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
<Culture>sample string 4</Culture>
<TicketId>sample string 3</TicketId>
<NewPassword>sample string 2</NewPassword>
<OldPassword>sample string 1</OldPassword>
</ChangePasswordArgumentModel>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
BaseReturnModel| Name | Description | Type | Additional information |
|---|---|---|---|
| CombinedPerformanceId |
Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null |
string |
Json null value handling: Ignore |
Response Formats
application/json, text/json
Sample:
{
"CombinedPerformanceId": "sample string 1"
}
application/xml, text/xml
Sample:
<BaseReturnModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
<CombinedPerformanceId>sample string 1</CombinedPerformanceId>
</BaseReturnModel>