unless Im reading the documentation wrong (very possible) you don't want to run API calls from the end point (people do, not sure they should) as how would you rate limit this?
Maybe something like Postman would help?

I think we need to step back and talk about what problem you are trying to solve, then discuss possible solutions.
Is what you are asking possible? Yes, you need to stand up a separate webserver and have the scripting run as a scheduled task. Ideally this should be done on a totally separate server/VM rather than the same server that Jamf is hosted on. However, keep in mind you are literally writing an appliance/application and there are likely tools that already do what you are wanting.
unless Im reading the documentation wrong (very possible) you don't want to run API calls from the end point (people do, not sure they should) as how would you rate limit this?
Maybe something like Postman would help?

Yes. the API script would be run once daily per a computer check-in to get info from a LDAP field which would store that info in a plist on the the users system
Yes. the API script would be run once daily per a computer check-in to get info from a LDAP field which would store that info in a plist on the the users system
maybe webhooks would work? https://developer.jamf.com/developer-guide/docs/webhooks
maybe webhooks would work? https://developer.jamf.com/developer-guide/docs/webhooks
Thanks, this is really interesting. But it seems you need a separate webserver setup and does not seem like it would work as you would need the bearer token created before an event happened, not after.
This tool looks real nice though:
https://marketplace.jamf.com/details/jawa
Probably will look into other solutions to run an API script to do everything on a secure server. Bummer Jamf does not offer a way to generate an API bearer token on the fly to pass to a policy script