Javascript access to Contact/Member/Event data
I would love to have data available to JavaScript that can be used to access other contact, membership, or event data that may not be available on a page or widget.
For instance, I have a case where I need to display links based on whether they belong to a certain membership group or membership level.
There is some 'BONAPAGE' global variables that can be accessed for system or page view status but nothing for the record of the current screen you may be viewing.
It would be great if there was a global object(s) available that contained the current record set just like the JSON data you can get from the API. So you could access 'contact.ismember' for example.
Please post your thumbs up so we can get this in a release.
Public API is now available for javascript access by path http://your_account.wildapricot.org/sys/api/….
This means that:
- AJAX requests to API is in the same domain
*JS application is able to access API without token - AJAX requests directed to the same domain as
- JS access API with the same permissions as currently logged in user.
Please read more on help site:
http://help.wildapricot.com/display/DOC/Authenticating+API+access+from+a+Wild+Apricot+site+page
-
Thanks Rick! I thought you might enjoy this addition!
-
Rick Smith commented
Awesome! Now give us create and update for events and we will be flying high
-
Rick Smith commented
That would be awesome if you can get this done. It would open up tons of customization options.
-
Hi Steve,
There are some probability to add this functionality in the middle of January, but I can't say for sure.
-
Steve Riegel commented
Any hope for release of this API/subpath solution within the next few months?
-
Matt & Christie PENNING commented
I could really use this to - or better yet the ability to use macros in page content:
But at least one of those would be really, really, helpful.
-
Steve Riegel commented
Sounds like this will work for me. So long as I can request .../Contacts/me and get memberID (or equivalent stable ID) in my page JS.
Thanks for your efforts to provide this!
-
Not earlier than a beginning of december. But I can't guarantee anything, priority mostly depends on number of votes for this idea.
-
Rick Smith commented
How fast could we do something like that ? It would solve a lot of issues for us.
-
Rick Smith commented
The public API as outlined would work. Then you could make all sorts of extensions by being able to access the API in the user context.
-
Steve Riegel commented
My wish is to have some form of stable ID of the logged-in WA user available to my restricted-access webpage. The ID can be anything (ex: hash of memberID), and I do not need any further info. I feel this is a reasonable and secure feature for a restricted-access webpage.
-
Steve Riegel commented
ID of the logged-on user (contactID) accessing a site webpage *OR* a consistent public proxy for it (hash) is the minimum that I need.
We can then check whether the WA user is allowed to access additional info from our (non-WA) app. We also need to map the WA user to the corresponding user in our non-WA app.
-
meldrum commented
This would be wonderful for us. We can then get the rest of the info via the API.
-
Leon Webster commented
I support this request. I only need a few fields such as memberID, member name, and member email, but it would be very handy to have these as javascript globals for us. It would allow us to load a page in an iframe based on the member's ID, and perhaps to email them a record of their involvement for the past year.