Is there a way to establish an API call that pulls data from the user that consists of their:
- Event stream
- Grouped by session ID
- Each event with:
- Event name
- Start time
We’re looking to analyze the different sessions a user has, mostly focused on the start time of the session and the duration that it lasts.
AFAIK, there isn’t an API which will specifically give you the listed items as mentioned directly. This can be directly viewed under the user event stream in the most concise manner if that helps- https://help.amplitude.com/hc/en-us/articles/229313067#view-a-users-details-and-event-stream
There are a few APIs out there which will give user information and events, but the format might not be suitable per your output requirements
Hope this helps.
I will agree with Saish on this - unfortunately, we do not offer one API that would return all of these fields at once, by making one call to the endpoint.
User Activity API would probably be the closest to your use case:
To export the most recent 1,000 events for a user, we can use the User Activity endpoint for the Dashboard REST API. The documentation can be found here.