POST api/Account/Logon?country={country}
Creates a logon ticket for anonymous logon. The only function that accepts an anonymous logon identity is the ActivityController.CreateActivity(CreateActivityArgumentModel) method.
Remarks
Currently we support the following values for country
- no, Norway
- se, Sweden
- dk, Denmark
- fi, Finland
- ru, Russia
Note that not all servers may support all countries. See general description of server
Examples
The sample below shows how to setup an anonymous logon
function logon (country) {
$.ajax({
url: 'https://api.infocare.com/api/Account/Logon?country=' + country,
type: "POST",
contentType: "application/json;charset=utf-8"
})
.done(function (result) {
// you should store the ticket id in a localStorage or in a cookie for further reference. In this sample
// we just print it to the console
console.log("logon success, ticket id: " + result.TicketId);
})
.fail(function (jqXHR, textStatus, err) {
console.log("logon failed: " + err);
})
});
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| country |
Identifies the country the user should get access to, see remarks section for list of valid values for country |
string |
Required |
Body Parameters
None.
Response Information
Resource Description
A UserModel including with a valid ticket
UserModel| Name | Description | Type | Additional information |
|---|---|---|---|
| TicketId |
Gets or sets the ticket id. This value is set when user logs on |
string |
None. |
| TicketExpirationDate |
Gets or sets the ticket expiration date |
date |
None. |
| LogonId |
Gets or set the logon id |
string |
None. |
| DisplayName |
Gets or sets the user diaply name |
string |
None. |
| SecurityRoles |
Gets or sets security roles |
Collection of string |
None. |
| CombinedActivityId |
If user is SingleActivityUser this property will get the only activity this user can access. This field is only set for SingleActivityUser |
string |
None. |
| UserType |
Gets or sets the user type, for example PartnerUser, SubContractorUser and so on. |
string |
None. |
| UserFields |
Gets or sets a list of user updates |
Collection of AttributeUpdateModel |
None. |
| DefaultDatabase |
Gets or sets default database |
string |
None. |
| AvailableDatabases |
Gets or sets a list of available databases |
Collection of string |
None. |
| SearchableContracts |
Gets or sets any contract restrictions set on user when searching for activities. If not set user have no restrictions related to contract and activity search. |
Collection of ContractModel |
Json null value handling: Ignore |
| AvailableContracts |
Gets or sets any contract restrictions set on user when searching for equipment. If not set user have no restrictions related to creating activities |
Collection of ContractModel |
Json null value handling: Ignore |
| AvailableStocks |
Gets or sets available stocks |
Collection of StockItem |
None. |
| AvailableStockContracts |
Gets or sets any stock contract restrictions for partner users. |
Collection of ContractModel |
None. |
| MustChangePassword |
Gets or sets MustChangePassword |
boolean |
None. |
| SearchableBrands |
Get or set brand restriction when searching for parts |
Collection of string |
Json null value handling: Ignore |
| AvailableBrands |
Gets or sets brand restriction when creating activities |
Collection of string |
Json null value handling: Ignore |
| AvailableReports |
Gets or sets available PowerBI reports |
Collection of BIReportModel |
Json null value handling: Ignore |
| DatabaseLogisticConfiguration | Collection of DatabaseItem |
Json null value handling: Ignore |
|
| 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 not available.