GET /api/users/{id}
Returns a single websak user
Description
Gets one singe user.
Parameter {id}: Value resolved using lookupField (lookupField=Id uses GID id (gid_gidid) or login (Gid_Loginn)).
Return values: One JSON object containing data for requested user.Parameters
| Name | In | Description | Required | Type |
|---|---|---|---|---|
| id | path | User identifier value for lookupField (lookupField=Id uses GID id (gid_gidid) or login (Gid_Loginn)). | true | string |
| lookupField | query | default=Id, Possible values: Id (default) and Code. | string | |
| includeEmailAddresses | query | bool to include or exclude user email addresses | boolean | |
| includeUserAccess | query | bool to include or exclude user access information | boolean | |
| includeRoles | query | bool to include or exclude roles assigned to user | boolean |
Responses
| Code | Returns | Type |
|---|---|---|
| 200 | Requested user | Acos.Websak.UserAPI.Core.Models.WebsakUser |
| 401 | Unauthorized - Missing or invalid access token | |
| 403 | Forbidden - Provided access token does not permit usage of this API or data | |
| 404 | User not found | Microsoft.AspNetCore.Mvc.ProblemDetails |
| 500 | Server error |
Response Example
{
"accessTemplateId":"string",
"accountNumber":"string",
"active":"boolean",
"addr":"string",
"addr2":"string",
"addr3":"string",
"addr4":"string",
"availableZones":
[{
"description": "string",
"id": "integer",
"isSensitive": "boolean",
"name": "string",
"priority": "integer",
"writeProtected": "boolean"
}]
,
"categoryId":"string",
"code":"string",
"contact":"string",
"countryId":"string",
"defaultArchiveSectionId":"string",
"defaultDepartmentId":"string",
"defaultJournalUnit":"string",
"departmentCode":"string",
"departmentId":"string",
"emailAddr":"string",
"emailAddr2":"string",
"externalId":"string",
"externalUsername":"string",
"gidId":"string",
"isSystemAdministrator":"boolean",
"languageId":"string",
"leaveFrom":"string",
"leaveTo":"string",
"misc1":"string",
"misc2":"string",
"misc3":"string",
"misc4":"string",
"misc5":"string",
"mobile":"string",
"municipalityNo":"string",
"name":"string",
"nationalNo":"string",
"note":"string",
"orgUnitId":"string",
"phone":"string",
"phone2":"string",
"place":"string",
"postalNo":"string",
"title":"string",
"userAccessCodes":"string",
"userAccessFunctions":
[{
"code": "string",
"description": "string",
"id": "integer",
"name": "string"
}]
,
"userRequestJsonString":"string",
"userRoles":
[{
"archiveList": "string",
"departmentList": "string",
"description": "string",
"gradeList": "string",
"id": "string",
"journalUnitList": "string",
"roleId": "string",
"roleUserId": "string"
}]
,
"validFrom":"string",
"visitingAddress":"string"
}PUT /api/users/{id}
Updates the Websak user profile with data from the JSON object provided.
Description
Updates supported scalar profile values from the request. Values not included in JSON will be translated either to "" (empty string) or [null]. Side effect: Not included properties will cause data to be deleted/overwritten. Include the complete user profile payload. Do not round-trip a GET response as the request. UserAccesses is not processed by this operation. Use PUT /api/Users/{id}/useraccesses to create or replace IdentityServer login mappings for an existing user. UserAccessFunctions, UserAccessCodes and UserRoles are also not direct inputs to this operation; use an access template or the dedicated access-code and role endpoints. If external department and/or accessTemplateId is changed, then current access can be reset from the selected access profile. Return values : 200 OK - User Created/Updated. 404 - Unknown user 500 - Error message contains more details
Parameters
| Name | In | Description | Required | Type |
|---|---|---|---|---|
| id | path | User identifier value for lookupField (lookupField=Id uses GID id (gid_gidid) or login (Gid_Loginn)). | true | string |
Request body
{
"accessTemplateId":"string",
"accessToZones":,
"accountNumber":"string",
"addr":"string",
"addr2":"string",
"addr3":"string",
"addr4":"string",
"categoryId":"string",
"code":"string",
"contact":"string",
"countryId":"string",
"defaultArchiveSectionId":"string",
"defaultDepartmentId":"string",
"defaultJournalUnit":"string",
"departmentCode":"string",
"departmentId":"string",
"emailAddr":"string",
"emailAddr2":"string",
"externalDepartmentId":"string",
"id":"string",
"isSecondaryUser":"boolean",
"languageId":"string",
"leaveFrom":"string",
"leaveTo":"string",
"lookupField":"string",
"mailAddresses":,
"misc1":"string",
"misc2":"string",
"misc3":"string",
"misc4":"string",
"misc5":"string",
"mobile":"string",
"municipalityNo":"string",
"name":"string",
"nationalNo":"string",
"note":"string",
"phone":"string",
"phone2":"string",
"place":"string",
"postalNo":"string",
"title":"string",
"userAccessCodes":"string",
"userAccessFunctions":
[{
"code": "string",
"description": "string",
"id": "integer",
"name": "string"
}]
,
"userAccesses":
[{
"domain": "string",
"id": "integer",
"isPrimary": "boolean",
"key": "string",
"provider": "string"
}]
,
"userRoles":
[{
"archiveList": "string",
"departmentList": "string",
"description": "string",
"gradeList": "string",
"id": "string",
"journalUnitList": "string",
"roleId": "string",
"roleUserId": "string"
}]
,
"userType":"string",
"username":"string",
"validFrom":"string",
"visitingAddress":"string"
}Responses
| Code | Returns | Type |
|---|---|---|
| 200 | OK | Acos.Websak.UserAPI.Core.Models.WebsakUser |
| 400 | Bad Request | |
| 401 | Unauthorized - Missing or invalid access token | |
| 403 | Forbidden - Provided access token does not permit usage of this API or data | |
| 404 | Not Found | |
| 500 | Internal Server Error |
Response Example
{
"accessTemplateId":"string",
"accountNumber":"string",
"active":"boolean",
"addr":"string",
"addr2":"string",
"addr3":"string",
"addr4":"string",
"availableZones":
[{
"description": "string",
"id": "integer",
"isSensitive": "boolean",
"name": "string",
"priority": "integer",
"writeProtected": "boolean"
}]
,
"categoryId":"string",
"code":"string",
"contact":"string",
"countryId":"string",
"defaultArchiveSectionId":"string",
"defaultDepartmentId":"string",
"defaultJournalUnit":"string",
"departmentCode":"string",
"departmentId":"string",
"emailAddr":"string",
"emailAddr2":"string",
"externalId":"string",
"externalUsername":"string",
"gidId":"string",
"isSystemAdministrator":"boolean",
"languageId":"string",
"leaveFrom":"string",
"leaveTo":"string",
"misc1":"string",
"misc2":"string",
"misc3":"string",
"misc4":"string",
"misc5":"string",
"mobile":"string",
"municipalityNo":"string",
"name":"string",
"nationalNo":"string",
"note":"string",
"orgUnitId":"string",
"phone":"string",
"phone2":"string",
"place":"string",
"postalNo":"string",
"title":"string",
"userAccessCodes":"string",
"userAccessFunctions":
[{
"code": "string",
"description": "string",
"id": "integer",
"name": "string"
}]
,
"userRequestJsonString":"string",
"userRoles":
[{
"archiveList": "string",
"departmentList": "string",
"description": "string",
"gradeList": "string",
"id": "string",
"journalUnitList": "string",
"roleId": "string",
"roleUserId": "string"
}]
,
"validFrom":"string",
"visitingAddress":"string"
}