UserInfo

Represents a User who has the ability to log into the system.

This is how the People that are allowed to access Keep are tracked.

UserInfo Properties

Item -> BaseInfo -> UserInfo

Field Type Inherited from Description
Href String Item Gets or sets the href.
CommonName String BaseInfo Common Name of the resource.The common name of the resource.
ConcurrencyVersion Nullable<Int64> BaseInfo Gets or Set the Version.
InFolderHref String BaseInfo relative path Href value for the containing folderAll objects exist within a folder. Even folders!
InFolderKey String BaseInfo Represents the internal ID of the containing folder
IsGlobal Boolean BaseInfo If set True, the object will be exposed to the entire instance scope in which it resides. Meaning this object will always pass scope wide permissions tests when being queried although other restrictions such as by type will still apply (You need at least Read on the object type to see it regardless where you are in the instance scope). This Attribute is intended for use with AccessLevelInfo objects only. Use with other model objects may cause unexpected behaviors. Particularly this should not be used with ScheduleInfos, HolidayInfos, HolidayDayInfos, or ElevatorAccessLevelInfos. In time more objects will be allowed for use with this attribute but for the time being please only use with AccessLevelInfo Objects.
Key String BaseInfo Represents the internal ID of the object.
Links List<Link> BaseInfo List of related resourcesIt is expected that a resource will have many related resources (i.e. person has many access levels) Consumers of the API are encouraged to iterate through the list of links requesting this additional information as required.
Metadata MetadataItem[] BaseInfo The set of metadata attached to this resourceMetadata is opaque to the server code. Key value pairs are saved as part of a client activity. Users of the Native windows client, are able to design custom forms to display and edit scalar values in the meta data.
Monikers MonikerItem[] BaseInfo the set of Monikers for this object
Notes NoteInfo[] BaseInfo The set of notes attached to this resourceNotes are free form text only that is stored in chronological order. All notes are retrieved as part of an OBJECT get. Notes may be added as one POST but not updated with a PUT of the primary resource. WHen the resource is deleted all the notes are also deleted.
ObjectLinks ObjectLinkItem[] BaseInfo The set of resources that are related to this resourceFrequently resources have a one to one, or one to many relationship with other resources in the system. Use this set of links to discover related resources. 2016/09/29 Href property of the related resource may be null. In which case it’s expected that a set of related objects has already been retrieved by the client and the Key value will be used to index into that set.
Tags String[] BaseInfo the set of tags for this objectTags are used to group objects together for the purposes of selection and assignment of operation rights
AcceptedEULA Boolean UserInfo Determines if the specific user has accepted the End User Licence Agreement. This value can not be set with a POST or PUT of the user, but only by PUT to /api/currentuser/acceptEULA
CannotChangePassword Boolean UserInfo Gets or sets a value indicating whether [cannot change password].Possible Values (true, false)
Email String UserInfo Gets or sets the Email value
IsDisabled Boolean UserInfo Gets or sets a value indicating whether this user is disabled. Set this value to true to block a user from logging in regardless of any policy set on the instance or user.Possible Values (true, false)
IsLockedOut Boolean UserInfo Gets or sets a value indicating whether this user is locked out due to exceeding the failed Logged in count of the instance/user policy.This value is maintaind by the login process. Administrators may reset this value to false to allow a user to login, but administrators should never set this value to true (see IsDisabled)Possible Values (true, false)
LastActivityOn DateTime UserInfo Gets or sets the last activity on.
LastLoginOn DateTime UserInfo Gets or sets the last login on.
LastPasswordChange DateTime UserInfo Gets or sets the last password change.
MustChangePassword Boolean UserInfo Gets or sets a value indicating whether [must change password].Possible Values (true, false)
PasswordPolicy PasswordPolicy UserInfo Determines the specific password policy for the user. This policy will override any password policy set on the instance
TwoFactorEnabled Boolean UserInfo Determines if Multi Factor Authentication is enabled for this user
Username String UserInfo Gets or sets the username.

JSON Structure of UserInfo

{
   "Href"	:	"String",
   "CommonName"	:	"String",
   "ConcurrencyVersion"	:	"Nullable\<Int64\>",
   "InFolderHref"	:	"String",
   "InFolderKey"	:	"String",
   "IsGlobal"	:	"Boolean",
   "Key"	:	"String",
   "Links"	:	"List\<[Link](/object-model/link)\>",
   "Metadata"	:	"[MetadataItem](/object-model/metadataitem)[]",
   "Monikers"	:	"[MonikerItem](/object-model/monikeritem)[]",
   "Notes"	:	"[NoteInfo](/object-model/noteinfo)[]",
   "ObjectLinks"	:	"[ObjectLinkItem](/object-model/objectlinkitem)[]",
   "Tags"	:	"String[]",
   "AcceptedEULA"	:	"Boolean",
   "CannotChangePassword"	:	"Boolean",
   "Email"	:	"String",
   "IsDisabled"	:	"Boolean",
   "IsLockedOut"	:	"Boolean",
   "LastActivityOn"	:	"DateTime",
   "LastLoginOn"	:	"DateTime",
   "LastPasswordChange"	:	"DateTime",
   "MustChangePassword"	:	"Boolean",
   "PasswordPolicy"	:	"[PasswordPolicy](/object-model/passwordpolicy)",
   "TwoFactorEnabled"	:	"Boolean",
   "Username"	:	"String"
}

Accept Eula Async

Example in C#

// Returns: nothing
await client.AcceptEulaAsync();

Add User Async

Example in C#

// Returns: UserInfo
var userInfo = await client.AddUserAsync(FolderInfo folder, UserInfo user);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.UserInfo, Feenics.Keep.WebApi.Model",
                       "Username":"UserExampleFor_cUrl",
                       "MustChangePassword":false,
                       "CannotChangePassword":false,
                       "IsLockedOut":false,
                       "IsDisabled":false,
                       "LastLoginOn":"0001-01-01T00:00:00",
                       "LastActivityOn":"0001-01-01T00:00:00",
                       "LastPasswordChange":"0001-01-01T00:00:00",
                       "TwoFactorEnabled":false,
                       "PasswordPolicy":null,
                       "Key":null,
                       "CommonName":"UserExampleFor_cUrl",
                       "InFolderHref":null,
                       "InFolderKey":null,
                       "Links":[],
                       "ObjectLinks":null,
                       "Metadata":null,
                       "Notes":null,
                       "Tags":null,
                       "Monikers":null,
                       "Href":null
                   }'
            

Add User To Group Async

Example in C#

// Returns: nothing
await client.AddUserToGroupAsync(UserInfo user, GroupInfo group);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users/USER.KEY/groups\
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '"/api/f/INSTANCE.KEY/groups/GROUP.KEY"'
            

Change Password Async

Example in C#

// Returns: nothing
await client.ChangePasswordAsync(UserInfo user, String newPassword, Boolean keepTFA);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users/USER.KEY/password \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '"New Password"'
            

Delete User Async

Example in C#

// Returns: nothing
await client.DeleteUserAsync(UserInfo user);

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users/USER.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Email Login Async

Example in C#

// Returns: String
var item = await client.EmailLoginAsync(String email, String password, String newPassword, String onetimePassword, Boolean sendOnetimePassword);

Get Current User Async

Example in C#

// Returns: UserInfo
var userInfo = await client.GetCurrentUserAsync();

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/currentuser \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get User By Person Async

Example in C#

// Returns: UserInfo
var userInfo = await client.GetUserByPersonAsync(PersonInfo personInfo);

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/people/PEOPLE.KEY/user \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Users Async

Example in C#

// Returns: IEnumerable<UserInfo>
var userInfo = await client.GetUsersAsync(FolderInfo folder);

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Users In Group Async

Example in C#

// Returns: IEnumerable<UserInfo>
var userInfo = await client.GetUsersInGroupAsync(GroupInfo group);

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/groups/GROUP.KEY/users \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Login Async

Example in C#

// Returns: String
var item = await client.LoginAsync(String instanceName, String fullUsername, String password, String newPassword, String onetimePassword, Boolean sendOnetimePassword);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/token \
               -H 'Content-Type: application/x-www-form-urlencoded' \
               -d 'grant_type=password&client_id=consoleApp&client_secret=consoleSecret&username=INSTANCE.COMMONNAME%5CYOURUSERNAME&password=YOURPASSWORD&instance=INSTANCE.COMMONNAME&sendonetimepassword=false'
            

Remove User From Group Async

Example in C#

// Returns: nothing
await client.RemoveUserFromGroupAsync(UserInfo user, GroupInfo group);

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users/USER.KEY/groups/GROUP.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Set User For Person Async

Example in C#

// Returns: nothing
await client.SetUserForPersonAsync(PersonInfo personInfo, UserInfo userInfo);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/people/PERSON.KEY/user \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '"/api/f/INSTANCE.KEY/users/USER.KEY"'
            

Update User Async

Example in C#

// Returns: nothing
await client.UpdateUserAsync(UserInfo user);

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/INSTANCE.KEY/users/USER.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.UserInfo, Feenics.Keep.WebApi.Model",
                       "Username":"UserExampleFor_cUrl",
                       "MustChangePassword":false,
                       "CannotChangePassword":false,
                       "IsLockedOut":false,
                       "IsDisabled":false,
                       "LastLoginOn":"0001-01-01T00:00:00",
                       "LastActivityOn":"0001-01-01T00:00:00",
                       "LastPasswordChange":"0001-01-01T00:00:00",
                       "TwoFactorEnabled":false,
                       "PasswordPolicy":null,
                       "Key":"USER.KEY",
                       "CommonName":"UserExampleFor_cUrl",
                       "InFolderHref":"/api/f/INSTANCE.KEY",
                       "InFolderKey":"INSTANCE.KEY",
                       "Links":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Groups",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"groups",
                                   "Text":"Member Of"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"SetPassword",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"password",
                                   "Text":"Set Password"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Person",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"person",
                                   "Text":"Person"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Meta",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"meta",
                                   "Text":"Metadata"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Monikers",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"monikers",
                                   "Text":"Monikers"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"CommonName",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"commonname",
                                   "Text":"Common Name"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Images",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"images",
                                   "Text":"Images"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"TakeOwnership",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"takeownership",
                                   "Text":"Take Ownership"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Connections",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"connections",
                                   "Text":"Connected Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"References",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"references",
                                   "Text":"Referencing Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Notes",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"notes",
                                   "Text":"Notes"
                               }
                           }
                       ],
                       "ObjectLinks":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME_HERE",
                               "Relation":"InInstance",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME_HERE",
                               "Relation":"InstanceScope",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           }
                       ],
                       "Metadata":[],
                       "Notes":[],
                       "Tags":[],
                       "Monikers":[],
                       "Href":"/api/f/INSTANCE.KEY/users/USER.KEY"
                   }'