GET /api/users
Gets all users defined in the system user limit=x&offset=n to paginate
To include email,access and roles, use following parameters
&includeEmailAddresses=true&includeUserAccess=true&includeRoles=true
Parameters
Name
In
Description
Required
Type
limit
query
Limit reponse to x rows. Default: 100
integer
offset
query
offset reponse rows
integer
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
Ok
Acos.Websak.UserAPI.Core.Models.WebsakUser[]
204
No content, if no users are registered
401
Unauthorized - Missing or invalid access token
403
Forbidden - Provided access token does not permit usage of this API or data
500
Error fetching data
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"
}]
POST /api/users
Create a new WebsakUser from JSON object provided.Returns JSON object representing created user.
Description
Creates a Websak user based on the JSON data provided in the request.
UserAccesses can be included to create the primary user's initial
IdentityServer login mappings in the same operation. The returned
externalId is generated by the service and must not be supplied by the client.
ExternalDepartmentID - External department id used for department lookup (Gid_Div1).
DepartmentCode - Department code => value will be matched against Department unit code. ExternalDepartmentID is then disregarded.
TilgangsOppsettID – ID for template for the user being created, the user gets access and roles based on this template.
LookupField - Name of field that is used to lookup existing user. Possible values: Id (default) and Code.
Parameters: JSON Data object Acos.Websak.UserAPI.Core.Models.UserRequest
Parameters
Name
In
Description
Required
Type
feilVedEksisterende
query
When true (default), returns 409 Conflict if user already exists instead of routing to PUT.
boolean
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
Object with updated user, and the GET url to user api/user/{newId}.
Acos.Websak.UserAPI.Core.Models.WebsakUser
201
Created json object with new/updated user, and the GET url to user api/user/{newId}.
Acos.Websak.UserAPI.Core.Models.WebsakUser
400
Malformed user request.
401
Unauthorized - Missing or invalid access token
403
Forbidden - Provided access token does not permit usage of this API or data
409
User already exists and implicit update is disabled.
500
Internal server error with message.
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"
}