Forum - Configuring User RestAPI-call
Tagged: User REST API
- This topic has 5 replies, 3 voices, and was last updated 3 months, 1 week ago by Daniel Sandbecker.
- August 17, 2022 at 10:27 pm #73628Evelyn BohanParticipant
Hi, The Alma interface runs and uses a RestAPI-call to extract the relevant user data from Alma – I’d like to know how do we know when to trigger the running of the interface program? do we need to configure it to be timed or is there a facility within Alma that can act as a trigger? We are configuring the user API to transfer users to an access control system – we need to ensure if a users account is modified the change is reflected in the access control system.
Any assistance would be appreciated.
EvelynAugust 22, 2022 at 1:46 pm #73642Daniel SandbeckerParticipant
I tried to reply to this earlier, but the forum ate my message.
I believe web hooks might be what you are looking for: https://developers.exlibrisgroup.com/alma/integrations/webhooks/
User updates are one of the event types listed as supported.
I haven’t used this so I can’t speak for how reliable they are. Given that you can’t “replay” events (though Alma makes some automatic retries for 10 hours) it might be wise to have a second synchronization strategy to avoid the state of the two stores drifting apart over time due to unhandled events.
/DanielAugust 22, 2022 at 3:41 pm #73643John PowerParticipant
Thanks Daniel for your post on this.
I’m working Evelyn on trying to figure this one out.
The Webhook option may well be part of the solution. I’ll look into the details of that.
I did notice however that according to the documentation ….[Note that user changes by API do not cause a webhook.].
In our set up, most user changes are in fact done by an API so it looks like a webhook won’t pick these up. However, it might work for the subset of changed that originate in the Alma front-end.
For the other cases, I wonder is is possible to do an API GET which returns only users which have changed since a given date?
If we had something like that we could periodically poll the system for any changes.
JohnAugust 23, 2022 at 6:46 am #73644Daniel SandbeckerParticipant
No, I don’t think that it is possible to get updated users only via the API. There is a search query parameter, but at least from the documentation it looks like update time is not one of the supported fields, and neither can I see any hints of a “greater than” operator. There is some kind of SFTP export job with a filter for “Days since update”, but I don’t know if you can trigger this via the API. It doesn’t look like it.
With Alma being a “source of truth”, I guess the only way to do this would be to iterate over all Alma users, then externally filtering by the update timestamp. This can of course be expensive in terms of API quotas and run time.
At my institution we do not synchronize user changes from Alma into other systems but only external changes into Alma. Some information in Alma is protected during this synchronization, the external service always starts by fetching the current user status form Alma and then merges its changes into that. When we find the need for it, we replay or (if absolutely needed) trigger new messages outside of Alma to fix issues or reduce drift.
DanielAugust 23, 2022 at 10:04 am #73645John PowerParticipant
Thanks again for your input Daniel.
That is also my reading of the documentation (can’t find any query based on last update date).
Do you know where I would find more information on the “SFTP export job ” you mention. Even if I can’t trigger it from an API, perhaps we could run that on a schedule and then go from there?
JohnAugust 23, 2022 at 12:38 pm #73654Daniel SandbeckerParticipant
Glad to be of help John.
I read about the export job here at developer network (under Integrations -> Users in Alma -> SIS -> Export) and then looked for it in Alma under integration profiles. But there is more information in the Alma online help, and I now noticed that there is an option to schedule this job, something I must have overlooked when I scanned the interface earlier.
(This is my fiftyeleventh attempt at posting this answer, but the forum has silently swallowed each of them. I’ve tried many things to get it through, this time removing the link to the page here on developer network and only posting the link to the knowledge center.)
- You must be logged in to reply to this topic.