# Get custom tracking sessions

`GET /api/timesheet/custom-tracking/sessions`

Retrieve custom tracking sessions with optional filtering by date range, employee, and project

Authentication: no security requirement declared for this operation.

Parameters:

- `source` (query, string, optional)
  Type: string
  
  enum: ["MOBILE","BROWSER","DESKTOP","BROWSER_EXTENSION","HUBSTAFF","UPWORK","TEAMS","CLOC"]

- `logType` (query, string, optional)
  Type: string
  
  enum: ["TRACKED","MANUAL","IDLE","RESUMED"]

- `activityLevel` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `tenant` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `tenantId` (query, string, optional)
  Type: string

- `organization` (query, object, required)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `organizationId` (query, string, required)
  Type: string

- `startDate` (query, string, date-time, optional)
  Type: string, date-time

- `endDate` (query, string, date-time, optional)
  Type: string, date-time

- `employeeIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `projectIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `taskIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `teamIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `relations` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `groupBySession` (query, boolean, optional) - Whether to group tracking sessions by sessionId
  Type: boolean
  
  default: true

- `includeDecodedData` (query, boolean, optional) - Whether to include decoded data in the response. By default, only encoded data is returned.
  Type: boolean
  
  default: false

- `sessionId` (query, string, optional) - Filter tracking sessions by session ID
  Type: string

Responses:

- 200: Custom tracking sessions retrieved successfully

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/timesheet/custom-tracking/sessions?organizationId=string&groupBySession=true&includeDecodedData=false'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/timesheet/custom-tracking/sessions?organizationId=string&groupBySession=true&includeDecodedData=false', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('http://localhost:3000/api/timesheet/custom-tracking/sessions?organizationId=string&groupBySession=true&includeDecodedData=false')
print(response.text)
```
