Timestamp filter for Sentry API for events - rest

I see that Sentry has an API to list the events in a project: https://docs.sentry.io/api/events/get-project-events/
But there doesn't seem to be any filter for start and end times here to get say, the events that occurred in the last one hour.
Is there any such filter available that I'm missing?

I think what you want is to first search by issues using https://docs.sentry.io/api/events/get-project-group-index/, and then get the latest event for each issue (if you need the level of detail) using https://docs.sentry.io/api/events/get-group-events-latest/
The first endpoint allows you to add ?query= at the end to use the search queries you're used from the UI. You can filter by timerange over lastSeen there.

It is related to this feature request:
Show only events which match filter in Issues screen. (also event &
user count)
https://github.com/getsentry/sentry/issues/15189

Related

How to get list of an account's events (labels, categories) from Google Analytics API

I have a request with ga:totalEvents and want to filter on e.g. event category. Now, I know that's available as dimension and that you can filter by using: ga:eventCategory==myEventCategory, but for this filter I need a list of all available event categories to choose from.
Does anyone know a way to achieve this? Thanks!
you are going to have to do it in two requests.
First request get list of categories:
Dimension ga:eventCategory and metric ga:users
Save that list that is returned some place.
Second request:
Use that list to build your filters.

Extract significant near future local events exact location and time using Facebook Graph Search api

I am looking for a way to extract significant (number of attendees > threshold) near future (within the next week) local events exact location and time using Facebook Graph Search api.
If local cannot be done, i could just specify a city (Athens, GR for example) instead.
It would be absolutely great if the info could be extracted with one query, but i think this is too much to hope for.
What i have tried so far is:
search?fields=location,events,name&limit=300&q=athens&type=place
This produces a set of events with name relative to "athens" as well as exact location, but not the time or number of attendees or event name.
{event_ID}?fields=attending.limit(1).summary(true)
This produces the number of attendees for a specific event_ID.
The total number of significant (let's assume more than 300 attendees) event for a week's span in Athens, GR should not be very high, therefore i could manually query the API as a last resort solution.
Does anyone have any idea if/how what i am asking can be achieved?
Thank you very much in advance.
You can't do this just in one query although you can probably batch some requests (https://developers.facebook.com/docs/graph-api/making-multiple-requests).
What I would do is:
Geo query to place: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search
GET graph.facebook.com
/search?
q=coffee&
type=place&
center=37.76,-122.427&
distance=1000
Get the page_id and query for public events (batch): https://developers.facebook.com/docs/graph-api/reference/page/events
Get attendants for those events (batch): https://developers.facebook.com/docs/graph-api/reference/v2.3/event/attending
I hope it helps.

Search API Facebook Graph by date range

is there any way to explore the Facebook Graph API by date range? Ex. to find all events on February?
I use following code, but I’m not sure, that’s correct request:
since=2015-01-28T00:00:00%2B0000&until=2015-01-30T00:00:00%2B00000
In this way, I get records for defined date range - ok, but there is missing events – a set is incomplete (despite it doesn’t exceed a limit of API). Why I can’t get all of results for given query?
Maybe do you know another method of filtering results by date?
thanks
There's no way to restrict the search results by since and until as far as I know.
For searching events, you can use the /search endpoint as described at
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#search
but I guess there's no further way to filter the results other than specifying the q parameter.

Google Analytics API TotalEvents query

I'm trying to get a total count for a give event,however I get a number much bigger(10-20 times bigger), than I see on the GA website, what am I doing wrong? (api v3)
here is the segment
metric:
ga:totalEvents
segment:
dynamic::ga:eventCategory==mycategory;ga:eventAction==myaction;ga:eventLabel==mylabel
note that I get wrong results with the query explorer as well.
You are using a segment instead of a filter.
Segments are session based so it will include all events in a session if it matches you specification. So essentially if I triggered the event you want plus other events they will all be included in the total events field.
What you need to do Is remove the segment and add a filter, the filter will include only the data you request.
Hope that helps

Getting all events given a certain filter criteria on Facebook

I'm trying to get events in Facebook that have a certain phrase or description in them. I'd like to not have the results filtered or limited, as the phrase is fairly specific.
As an example, the phrase I'm looking for is "UMvC3" (short for Ultimate Marvel vs. Capcom 3).
That said, I could run an FQL query (and subsequently enrich with a call to the Graph API, like so):
select eid from event where contains("umvc3") and start_time >= now()
order by update_time desc
This will give me upcoming events with "umvc3" in them as well as only ones occurring in the future (I'm not concerned with past events).
However, the selection is severely limited. For example, the following isn't returned in the search results:
https://www.facebook.com/events/595137740538545/
It clearly has "umvc3" in the description text.
I can perform a search using the Graph API, but that doesn't return the above result either. Additionally, I can't filter using the Graph API on the start_time or order the results in a manner where I can stop processing the result set once I get to a certain point.
Finally, there is the Public Feed API, which will give me the entire firehose (which isn't filterable, like Twitter's, unfortunately), so I'll have to filter in real-time, which could be near impossible.
That said, am I approaching this the wrong way, or is there no way to really get a comprehensive, exact set of results from the Facebook API for events?
Note: I'm using the access_token provided by the Graph Explorer in the tools section.
The description column of Event FQL table isn't indexable, thus the freestyle search on not indexable columns won't give any result.
The results you see by running the query you suggested gives only events where the 'umvc3' is in the name column, which is indexable.
The only option is to ask facebook for fulltext indexing this column which apparently won't happen. They surely won't open any column for using clause like 'LIKE' since the query execution will take a lot of time.
And the answer from Facebook developer: https://stackoverflow.com/a/5824449/334522