The LDAP Service uses the Publish Method (attached to EventTypeInfo) to interact with its respective service.
Please observe the examples of how to use the service commands. The examples assume you have already set up the appropriate object to use for the object link. However the objects used are named to correspond to the type of object that is meant to be linked.
AppKey | Namespace |
---|---|
LdapService | LdapServiceEvents |
The available commands for this service are presented below:
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Re-Sync A Query | ldap:queryReSyncRecords | LdapQuery,LdapAgent | NONE |
This Command initializes the attached LDAP Query that is active on the running Agent to commence a full Synchronization of all records from what was its initial state.
Re-Sync a Query
Example in C#
await client.PublishEventAsync(currentInstance,
"LdapService",
new MonikerItem {Namespace = "LdapServiceEvents", Nickname = "ldap:queryReSyncRecords"},
DateTime.UtcNow,
new {},
ldapQuery.AsObjectLink("LdapQuery"),
ldapAgent.AsObjectLink("LdapAgent")
);
Example in CURL
curl -X POST \
https://qa-v3.feenicshosting.com/api/f/INSTANCE.KEY/eventmessagesink \
-H 'Authorization: Bearer TOKEN_GOES_HERE' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"$type": "Feenics.Keep.WebApi.Model.EventMessagePosting, Feenics.Keep.WebApi.Model",
"OccurredOn": "2019-01-28T16:46:24.5691777Z",
"AppKey": "LdapService",
"EventTypeMoniker": {
"$type": "Feenics.Keep.WebApi.Model.MonikerItem, Feenics.Keep.WebApi.Model",
"Namespace": "LdapServiceEvents",
"Nickname": "ldap:queryReSyncRecords"
},
"RelatedObjects": [
{
"$type": "Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href": "/api/f/INSTANCE.KEY/ldapqueries/LDAPQUERY.KEY",
"LinkedObjectKey": "LDAPQUERY.KEY",
"CommonName": "DirSyncLDAP",
"Relation": "LdapQuery",
"MetaDataBson": null
},
{
"$type": "Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href": "/api/f/INSTANCE.KEY/ldapagents/LDAPAGENT.KEY",
"LinkedObjectKey": "LDAPAGENT.KEY",
"CommonName": "LDAP Agent",
"Relation": "LdapAgent",
"MetaDataBson": null
}
],
"EventDataBsonBase64": "BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Delete all items in a Query | ldap:queryDeleteRecords | LdapQuery,LdapAgent | NONE |
Note: This command should be used with caution. Be sure you are executing this command on an LDAP Query that will only find the items you wish to delete. If using DirSync all Active Directory imported persons will be removed from Keep.
Delete all items in a Query
Example in C#
await client.PublishEventAsync(currentInstance,
"LdapService",
new MonikerItem {Namespace = "LdapServiceEvents", Nickname = "ldap:queryDeleteRecords"},
DateTime.UtcNow,
new {},
ldapQuery.AsObjectLink("LdapQuery"),
ldapAgent.AsObjectLink("LdapAgent")
);
Example in CURL
curl -X POST \
https://qa-v3.feenicshosting.com/api/f/INSTANCE.KEY/eventmessagesink \
-H 'Authorization: Bearer TOKEN_GOES_HERE' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"$type": "Feenics.Keep.WebApi.Model.EventMessagePosting, Feenics.Keep.WebApi.Model",
"OccurredOn": "2019-01-28T16:46:24.5691777Z",
"AppKey": "LdapService",
"EventTypeMoniker": {
"$type": "Feenics.Keep.WebApi.Model.MonikerItem, Feenics.Keep.WebApi.Model",
"Namespace": "LdapServiceEvents",
"Nickname": "ldap:queryDeleteRecords"
},
"RelatedObjects": [
{
"$type": "Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href": "/api/f/INSTANCE.KEY/ldapqueries/LDAPQUERY.KEY",
"LinkedObjectKey": "LDAPQUERY.KEY",
"CommonName": "DirSyncLDAP",
"Relation": "LdapQuery",
"MetaDataBson": null
},
{
"$type": "Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href": "/api/f/INSTANCE.KEY/ldapagents/LDAPAGENT.KEY",
"LinkedObjectKey": "LDAPAGENT.KEY",
"CommonName": "LDAP Agent",
"Relation": "LdapAgent",
"MetaDataBson": null
}
],
"EventDataBsonBase64": "BQAAAAA="
}'