LdapQueryInfo

This is how queries for the LDAP are gathered, changed, and stored. This queries the Active Directory.

LdapQueryInfo Properties

Item -> BaseInfo -> LdapQueryInfo

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
BindPath String LdapQueryInfo The Bind Path.
DirSync Nullable<Boolean> LdapQueryInfo use Directory Sync protocol when set to true
Disabled Nullable<Boolean> LdapQueryInfo When set, this query will be skipped in the directoy query cycle
Frequency Int32 LdapQueryInfo Time between each query in milliseconds.
HostName String LdapQueryInfo Host Name or IP Address of the server.
LastSyncTime Nullable<DateTime> LdapQueryInfo Gets or sets the LastSyncTime value
LastUsnChanged Nullable<Int32> LdapQueryInfo Gets or sets the LastUsnChanged value
Password String LdapQueryInfo The account’s password that the LDAP agent will use to connect to the server. This field is optional if the agent is running under a domain user.
PersonFieldsMapping Dictionary<String> LdapQueryInfo Mapping of PersonInfo fields to LDAP attributes
Port Int32 LdapQueryInfo The port used to connect to the server. This is usually set as 389. Use 636 for secure connections.
PreserveCards Nullable<Boolean> LdapQueryInfo When enabled, active card assignments will be preserved when a card holder is disabled from the LDAP directory
Query String LdapQueryInfo The query to perform on the LDAP server.
UserName String LdapQueryInfo User name that the LDAP agent will use to connect to the server. This field is optional if the agent is running under a domain user.
UseSsl Boolean LdapQueryInfo Set this to true to force a secure connection.

JSON Structure of LdapQueryInfo

{
   "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[]",
   "BindPath"	:	"String",
   "DirSync"	:	"Nullable\<Boolean\>",
   "Disabled"	:	"Nullable\<Boolean\>",
   "Frequency"	:	"Int32",
   "HostName"	:	"String",
   "LastSyncTime"	:	"Nullable\<DateTime\>",
   "LastUsnChanged"	:	"Nullable\<Int32\>",
   "Password"	:	"String",
   "PersonFieldsMapping"	:	"Dictionary\<String\>",
   "Port"	:	"Int32",
   "PreserveCards"	:	"Nullable\<Boolean\>",
   "Query"	:	"String",
   "UserName"	:	"String",
   "UseSsl"	:	"Boolean"
}

Add Ldap Query Async

Example in C#

// Returns: LdapQueryInfo
var ldapQueryInfo = await client.AddLdapQueryAsync(FolderInfo folder, LdapQueryInfo item);

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapqueries \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.LdapQueryInfo, Feenics.Keep.WebApi.Model",
                       "HostName":null,
                       "BindPath":null,
                       "Port":0,
                       "UseSsl":false,
                       "UserName":null,
                       "Password":null,
                       "Frequency":0,
                       "Query":null,
                       "PersonFieldsMapping":null,
                       "LastSyncTime":null,
                       "LastUsnChanged":null,
                       "DirSync":null,
                       "PreserveCards":null,
                       "Disabled":null,
                       "Key":null,
                       "CommonName":"QueryExampleFor_cUrl",
                       "InFolderHref":null,
                       "InFolderKey":null,
                       "Links":[],
                       "ObjectLinks":null,
                       "Metadata":null,
                       "Notes":null,
                       "Tags":null,
                       "Monikers":null,
                       "Href":null
                   }'
            

Add Ldap Query To Agent

Example in C#

// Returns: nothing
await client.AddLdapQueryToAgent(LdapAgentInfo ldapAgent, LdapQueryInfo ldapQuery);

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapagents/AGENT.KEY/connections/LdapQuery?isOneToOne=False&relatedKey=QUERY.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D 'null'
            

Delete Ldap Query Async

Example in C#

// Returns: nothing
await client.DeleteLdapQueryAsync(LdapQueryInfo item);

Example in CURL



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

Get Ldap Queries Async

Example in C#

// Returns: IEnumerable<LdapQueryInfo>
var ldapQueryInfo = await client.GetLdapQueriesAsync(FolderInfo folder);

Example in CURL



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

Get Ldap Queries For Ldap Agent Async

Example in C#

// Returns: IEnumerable<LdapQueryInfo>
var ldapQueryInfo = await client.GetLdapQueriesForLdapAgentAsync(LdapAgentInfo ldapAgent);

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapagents/AGENT.KEY/connections/LdapQuery?isOneToOne=False&relatedKey=QUERY.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Remove Ldap Query From Agent

Example in C#

// Returns: nothing
await client.RemoveLdapQueryFromAgent(LdapAgentInfo ldapAgent, LdapQueryInfo ldapQuery);

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapagents/AGENT.KEY/connections/LdapQuery?isOneToOne=False&relatedKey=QUERY.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Update Ldap Query Async

Example in C#

// Returns: nothing
await client.UpdateLdapQueryAsync(LdapQueryInfo item);

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapqueries/QUERY.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.LdapQueryInfo, Feenics.Keep.WebApi.Model",
                       "HostName":null,
                       "BindPath":null,
                       "Port":0,
                       "UseSsl":false,
                       "UserName":null,
                       "Password":null,
                       "Frequency":0,
                       "Query":null,
                       "PersonFieldsMapping":
                       {
                           "$type":"System.Collections.Generic.Dictionary`2
                               [
                                   [System.String, mscorlib],
                                   [System.String, mscorlib]
                               ],
                               mscorlib"
                       },
                       "LastSyncTime":null,
                       "LastUsnChanged":null,
                       "DirSync":null,
                       "PreserveCards":null,
                       "Disabled":null,
                       "Key":"QUERY.KEY",
                       "CommonName":"QueryExampleFor_cUrl",
                       "InFolderHref":"/api/f/INSTANCE.KEY",
                       "InFolderKey":"INSTANCE.KEY",
                       "Links":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"LastSyncTime",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"lastsynctime",
                                   "Text":"Set Last Sync Time"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"LastUsnChanged",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"lastusnchanged",
                                   "Text":"Set Last Usn-Changed"
                               }
                           },
                           {
                               "$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",
                               "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",
                               "Relation":"InstanceScope",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           }
                       ],
                       "Metadata":[],
                       "Notes":[],
                       "Tags":[],
                       "Monikers":[],
                       "Href":"/api/f/INSTANCE.KEY/ldapqueries/QUERY.KEY"
                   }'
            

Update Ldap Query Last Sync Time

Example in C#

// Returns: nothing
await client.UpdateLdapQueryLastSyncTime(LdapQueryInfo ldapQuery, DateTime lastSyncTime);

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapqueries/lastsynctime \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '"2019-02-27T14:18:19.4210484Z"'
            

Update Ldap Query Last Usn Changed

Example in C#

// Returns: nothing
await client.UpdateLdapQueryLastUsnChanged(LdapQueryInfo ldapQuery, Int32 lastUsnChanged);

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/ldapqueries/lastusnchanged \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '0"'