# Get Statistics for Counts

`GET /api/timesheet/statistics/counts`

Endpoint to retrieve statistics for counts based on the provided query parameters.

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

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

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

- `defaultRange` (query, boolean, optional)
  Type: boolean

- `unitOfTime` (query, string, optional)
  Type: string
  
  Example:
  
  ```json
  "week"
  ```

- `take` (query, number, optional)
  Type: number

Responses:

- 200: Successfully retrieved statistics for counts.

- 400: Invalid input. The response body may contain clues as to what went wrong.

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/timesheet/statistics/counts?organizationId=string'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/timesheet/statistics/counts?organizationId=string', {
  method: 'GET',
});

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

### Python

```python
import requests

response = requests.get('http://localhost:3000/api/timesheet/statistics/counts?organizationId=string')
print(response.text)
```
