How to get object specific events using Box Api - events

I am having difficulty getting the events for a specific object. Basically I would like to have an event collection that reprents the "Access Stats" when looking at a file's properties on box.com. The only way I can figure to do it now is to run through all events in the stream and manually build the collection. Is there not an endpoint I can use or a query filter I can put on the events endpoint to accomplish this?
Thanks
Shawn

This is something our fields parameter would help with, but it's not yet GET /events. Keep an eye on this portion of our documentation for when support for this is available. http://developers.box.com/docs/#fields

Related

How can I read a json webhook from mixpanel using Zapier?

I catch a webhook from mixpanel. The payload includes all the people properties and is formatted in a json object. So far so good. Unfortunately it seems, that I can´t access the properties values I need to.
I have played around with formatter and the coding feature of zapier. I couldn´t make it work.
Help is much appreciated.
Best
You don't need any code to make it work.
Type 'users' in 'Pick off a Child Key'. (Trigger > Edit Options)
Then you'll have access to the properties values.

How can I retrieve list members using given a unique_email_id on Mailchimp API v3?

Given a unique_email_id, how can I retrieve all list members matching that ID?
I am attempting to use the search-members endpoint, ala what I do for searching email-addresses:
https://us9.api.mailchimp.com/3.0/search-members?query=chris#chris.com
but instead (given a unique_email_id of 4dce5
https://us9.api.mailchimp.com/3.0/search-members?query=4dce5
and I'm getting no results.
Is there another endpoint I'm missing?
However using the query string ?unique_email_id=X attached to the end
of GET lists/list_id/members will pull up anyone with that specific
EUID.
Indeed this works very well. Example :
GET /3.0/lists/dfc3cf4b38/members?unique_email_id=f4b75a9d78&fields=members.email_address
will return :
{"members":[{"email_address":"my_email#hotmail.com"}]}
I've had a chat with the mailchimp support about this issue. This was there response (part of it because not everything discussed in that chat is relevant to this question):
(09:00:04 AM) Mailchimp support: Thanks for hanging in there, Me. It looks like
the email_unique_id can't be searched via API endpoint like it can be
within the app. Another option to get to your goal is GET to
lists/list_id/members with the query string
?fields=members.email_address,members.unique_email_id which should
pull up all their subscribers' emails and unique ids. At that point,
you can filter through those results for the unique id
(09:00:52 AM) Me: Same goes for the user ID I guess?
(09:02:05 AM) Me: Why can't it be searched? When I list ids as well I might miss information. I don't need the unique_email_id in my response, I need to search for it to retrieve user information without getting duplicates in my result
(09:07:11 AM) Mailchimp support: Ok I understand, one
moment while we test this out for you. Thanks again for your patience!
(09:16:22 AM) Mailchimp support: Hey Me, thanks for waiting. I tested the
endpoint lists/list_id/members?unique_email_id=e8da8fa60a and  I was
able to return just the one subscriber with that field. Search-Members
only functions the way it does in app where you can only search
specific strings like names, email addresses, but not ids as those
aren't visible in app. However using the query string
?unique_email_id=X attached to the end of GET lists/list_id/members
will pull up anyone with that specific EUID.

Is there a way to search for transactions by custom field?

I store specific custom field for each transaction. I'd like to conduct a search by this field. I wouldn't like to retrieve too many transactions (can filter by payment method id, but still) and iterate through them on application side. So, I read a documentation, didn't find an ability to search by custom field (only by predefined). I didn't try it out, but probably it's possibly to do so by following the same pattern like
var stream = gateway.transaction.search(function (search) {
search.myCustomField().is("custom_field_value");
// or search.customFields.myCustomField().is("custom_field_value");
});
Thanks in advance
I work as a developer for Braintree. Searching on custom fields is not supported at this time. You can see all of the searchable transaction attributes listed here.
If you would like to discuss alternatives, I recommend emailing our support team at support#braintreepayments.com to see if there is another method to achieve what you are trying to do.

Filter the form choices visible in the browseable API

I am using a filter to apply object level permissions to a collection. Resources in a second collection have a many-to-many relationship with the first. On the browsable API, when creating resources in the second collection, the user is presented with a list of resources from the first to link it to. However, this list is not filtered, so the user can see values that they should not be able to see.
I've poked around the documentation and source a bit and I cannot see a way to add filtering to the queryset that generates the choices without overloading or modifying a bunch of code to pass the request data down (probably removing some of the collection specific data on the way) and then apply the filters.
Is there a better way to achieve this?
Currently there's nothing to support this out of the box. Pull requests are always welcome. If it's something you want to work on you may want to either open a ticket on GitHub or hit up the mailing list to discuss it first.

Magento Event (Which event is called on Index?)

As stated in the question, which event is fired when someone goes into the admin panel and selects reindex data for Catalog Search Index?
I tried running grep on my command shell and I cannot seem to get that to work (to get a list of events). I've tried looking at event lists and can't find the correct one.
I would tend to think that the event catalogindex_plain_reindex_after would be fired, but I have tried this and that is not the case...
Any help would be greatly appreciated!
If you cannot find any particular event dispatch you can always get the following event on controller:
<controller_action_postdispatch_adminhtml_index_process_massReindex>...</controller_action_postdispatch_adminhtml_index_process_massReindex>
and in the observer you can get the controller params as:
$observer->getEvent()->getData('controller_action')->getRequest()->getParam('some_id_or_variable');
where 'some_id_or_variable' is the value you want to get from request params.

Resources