---
title: Get tracking session slices by attendee id
slug: get-tracking-session-slices-by-attendee-id
docTags: 
createdAt: 2023-04-12T08:32:15.000Z
---

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.brella.io/api/integration/organizations/{organizationId}/events/{eventId}/attendees/{attendeeId}/tracking_session_slices",
  "name": "Get tracking session slices by attendee id",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "{organizationId}",
        "type": "Number",
        "children": [],
        "description": "The id of the Brella organization you are trying to retrieve data from"
      },
      {
        "kind": "required",
        "name": "{eventId}",
        "type": "Number",
        "children": [],
        "description": "The id of the Brella event you are trying to retrieve data from"
      },
      {
        "kind": "required",
        "name": "{attendeeId}",
        "type": "Number",
        "children": [],
        "description": "The id of the attendee you are trying to retrieve data from"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Brella-API-Access-Token",
        "type": "String",
        "children": [],
        "description": "Your unique Brella API key"
      },
      {
        "kind": "required",
        "name": "Accept",
        "type": "string",
        "children": [],
        "description": "application/vnd.brella.v4+json"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "application/json"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "PsoboMOJ9Uo00iBrqhmgp",
        "code": "{\n    \"data\": [\n        {\n            \"id\": \"66097\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-15T10:08:03.055Z\",\n                \"end-time\": \"2023-05-15T10:09:00.993Z\",\n                \"duration-seconds\": 58\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13521\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65967\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T11:49:15.019Z\",\n                \"end-time\": \"2023-05-10T12:47:33.929Z\",\n                \"duration-seconds\": 3499\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65965\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T11:06:35.752Z\",\n                \"end-time\": \"2023-05-10T12:05:32.728Z\",\n                \"duration-seconds\": 3537\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65958\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T10:38:44.630Z\",\n                \"end-time\": \"2023-05-10T10:39:55.061Z\",\n                \"duration-seconds\": 70\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65956\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T10:10:39.732Z\",\n                \"end-time\": \"2023-05-10T10:36:18.231Z\",\n                \"duration-seconds\": 1538\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65955\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T09:55:47.422Z\",\n                \"end-time\": \"2023-05-10T10:16:43.714Z\",\n                \"duration-seconds\": 1256\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65954\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T09:42:25.811Z\",\n                \"end-time\": \"2023-05-10T10:12:10.206Z\",\n                \"duration-seconds\": 1784\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65885\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T08:32:35.024Z\",\n                \"end-time\": \"2023-05-10T09:31:33.320Z\",\n                \"duration-seconds\": 3538\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13496\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        },\n        {\n            \"id\": \"65877\",\n            \"type\": \"tracking-session-slice\",\n            \"attributes\": {\n                \"tracking-type\": \"time_spent\",\n                \"click-time\": null,\n                \"start-time\": \"2023-05-10T04:18:38.073Z\",\n                \"end-time\": \"2023-05-10T04:19:30.977Z\",\n                \"duration-seconds\": 53\n            },\n            \"relationships\": {\n                \"tracking-session\": {\n                    \"data\": {\n                        \"id\": \"13494\",\n                        \"type\": \"tracking-session\"\n                    }\n                }\n            }\n        }\n    ],\n    \"included\": [\n        {\n            \"id\": \"693\",\n            \"type\": \"trackable\",\n            \"attributes\": {\n                \"trackable-type\": \"Event\",\n                \"name\": \":boom: LIVE :boom:Unicorn Hunt Conference\",\n                \"title\": null,\n                \"url\": null,\n                \"body-type\": null\n            }\n        },\n        {\n            \"id\": \"13521\",\n            \"type\": \"tracking-session\",\n            \"attributes\": {\n                \"interaction-count\": 0,\n                \"duration-seconds\": 58\n            },\n            \"relationships\": {\n                \"trackable\": {\n                    \"data\": {\n                        \"id\": \"693\",\n                        \"type\": \"trackable\"\n                    }\n                },\n                \"tracking-session-slices\": {\n                    \"data\": [\n                        {\n                            \"id\": \"66097\",\n                            \"type\": \"tracking-session-slice\"\n                        }\n                    ]\n                }\n            }\n        },\n        {\n            \"id\": \"53129\",\n            \"type\": \"trackable\",\n            \"attributes\": {\n                \"trackable-type\": \"Sponsor\",\n                \"name\": \"Bob, from Bob Vance Refrigeration\",\n                \"title\": null,\n                \"url\": null,\n                \"body-type\": null\n            }\n        },\n        {\n            \"id\": \"13496\",\n            \"type\": \"tracking-session\",\n            \"attributes\": {\n                \"interaction-count\": 3,\n                \"duration-seconds\": 15222\n            },\n            \"relationships\": {\n                \"trackable\": {\n                    \"data\": {\n                        \"id\": \"53129\",\n                        \"type\": \"trackable\"\n                    }\n                },\n                \"tracking-session-slices\": {\n                    \"data\": [\n                        {\n                            \"id\": \"65967\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65965\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65958\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65956\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65955\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65954\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65885\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65887\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65886\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65884\",\n                            \"type\": \"tracking-session-slice\"\n                        }\n                    ]\n                }\n            }\n        },\n        {\n            \"id\": \"3187\",\n            \"type\": \"trackable\",\n            \"attributes\": {\n                \"trackable-type\": \"Sponsor\",\n                \"name\": \"Google Cloud Platform - Send us a virtual meeting request!\",\n                \"title\": null,\n                \"url\": null,\n                \"body-type\": null\n            }\n        },\n        {\n            \"id\": \"13494\",\n            \"type\": \"tracking-session\",\n            \"attributes\": {\n                \"interaction-count\": 1,\n                \"duration-seconds\": 53\n            },\n            \"relationships\": {\n                \"trackable\": {\n                    \"data\": {\n                        \"id\": \"3187\",\n                        \"type\": \"trackable\"\n                    }\n                },\n                \"tracking-session-slices\": {\n                    \"data\": [\n                        {\n                            \"id\": \"65878\",\n                            \"type\": \"tracking-session-slice\"\n                        },\n                        {\n                            \"id\": \"65877\",\n                            \"type\": \"tracking-session-slice\"\n                        }\n                    ]\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"total_count\": 9,\n        \"total_pages\": 1,\n        \"current_page\": 1\n    }\n}\n",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "ZacAjbWCD8fuhtfgoffqR",
        "language": "204",
        "code": "{\n    \"data\": [],\n    \"included\": [],\n    \"meta\": {\n        \"total_count\": 0,\n        \"total_pages\": 0,\n        \"current_page\": 1\n    }\n}\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "PsoboMOJ9Uo00iBrqhmgp"
  },
  "examples": {
    "languages": [
      {
        "id": "58_P6EC5ew_4aK8Jmjcmg",
        "code": "curl --location -g --request GET 'https://api.brella.io/api/integration/organizations/{organizationId}/events/{eventId}/attendees/{attendeeId}/tracking_session_slices' \\\n--header 'Brella-API-Access-Token: String' \\\n--header 'Accept: application/vnd.brella.v4+json' \\\n--header 'Content-Type: application/json'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "58_P6EC5ew_4aK8Jmjcmg"
  },
  "description": "Get all tracking sessions for a specific attendee at the event",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "get-tracking-session-slices-by-attendee-id",
  "legacyHash": "GVk1RuRk7dJUk_oA_kdbt"
}
```
:::

Notes:&#x20;

### Filtering data:

The following url attributes are accepted for filtering:&#x20;

- tracking\_type
- trackable\_type
- click\_time
- start\_time
- end\_time
- duration
- start\_from
- start\_to
- end\_from
- end\_to

**Note on filtering by&#x20;**`tracking_type`**:**

By default, this endpoint returns three types of tracking sessions:

- time\_spent
- sponsor
- streamlink

Give the value for this param as "time\_spent" — otherwise, it will also return clicks in media elements in the sponsor booth etc.

**A note about filtering by time (i.e. using&#x20;**`start_time`**,&#x20;**`end_time`**,&#x20;**`start_from`**,&#x20;**`start_to`**,&#x20;**`end_from`**,&#x20;**`end_to`**)**

- `start_time` and `end_time` will search for an exact match for sessions that start / end  at an exact time. These filtering options are not commonly used in automated retrievals, unless you are manually searching for slices from an exact time. 
- For automated retrieval,  we recommend using the `start_from`, `start_to`, `end_from`, `end_to` attributes.
- By providing these attributes, the endpoint finds records where start\_time is between start\_from and start\_to. Respectively it finds records where end\_time is between end\_from and end\_to.
- You can also provide an open-ended time range, for example by only providing `start_from` but not `start_to`. In this case the endpoint selects records where `start_time` is greater than or equal to `start_from` but doesn't limit results by a maximum `start_time`.

### Usage example:

**Whether an attendee "checks-in to" / uses the event app during the event**

An example use-case of tracking whether an attendee “checked-in” to Brella during an event (presence): 

- Let's assume that you have an event that begins on `2023-05-10` and ends on `2023-05-15`. You've invited people to Brella a week before the event, BUT, you are only interested in whether they checked-in after the event begins (i.e.  on or after `2023-05-10`).
- So, your requests would look like the following:
  - `https://api.brella.io/api/integration/organizations/{{organizationId}}/events/{{event_id}}/attendees/{{attendeeId}}/tracking_session_slices?tracking_type=time_spent&start_from=``2023-05-10T00:00:00.000Z`
- This would return any session slices that begin after **2023-05-10T00:00:00.000Z**. While you could specify the exact event start time as well, we recommend just leaving it at midnight that day to account for edge cases.
- IF the attendee has visited Brella after the specified time, the endpoint will return all relevant tracking session slices. IF the attendee didn't "check-in/ visit Brella during this time", it will return an empty response.
- So, basically, all you need to do is run this query for your attendees, dynamically replacing the attendee\_id, and if the response is empty: They haven't "checked-in", if the response has data, then, that attendee has "checked in".

