# List timelogs

> Retrieve a list of timelogs with optional filters.

> For the complete documentation index, see [llms.txt](https://helpdesk.orangescrum.com/llms.txt).

Source: https://helpdesk.orangescrum.com/guide/api/endpoints/timelogs/timelogs-list

---
`POST /api/v1/partner/timelogs/list`

Retrieve a list of timelogs with optional filters. All data must be encrypted in the request body. Response returns decrypted JSON data.

## Authorizations

- `X-API-KEY` *string* (required) — Developer API key (starts with pk_)

- `X-TIMESTAMP` *integer* (required) — Unix timestamp in seconds (must be within ±5 minutes of server time)

- `X-NONCE` *string* (required) — One-time random string (minimum 8 characters, prevents replay attacks)

- `X-SIGNATURE` *string* (required) — HMAC-SHA256 signature of canonical string (hex-encoded)

## Headers

- `Accept` *string* (required) — Content type for response

- `Content-Type` *string* (required) — Content type for request

## Request body

Encrypted request data containing optional filter parameters

- `encrypted_data` *string* (required) — Base64-encoded encrypted JSON data. Encryption: AES-256-CBC with 16-byte IV prepended. Key: SHA256 hash of secret key.

## Responses

- **200** — Timelogs retrieved successfully

- **400** — Bad request - Invalid filters

- **401** — Unauthorized - Invalid or missing API key

- **500** — Server error
## Request samples

### cURL

```bash
curl -X POST 'https://v4-api.orangescrum.com/api/v1/partner/timelogs/list' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: pk_your_api_key' \
  -H 'X-TIMESTAMP: '"$(date +%s)" \
  -H 'X-NONCE: '"$(openssl rand -hex 8)" \
  -H 'X-SIGNATURE: <hmac-sha256>' \
  -d '{"encrypted_data":"<base64-aes-256-cbc-payload>"}'
```

### Python

```python
# call() is defined on the Authentication page.
from orangescrum import call

response = call(
    "/api/v1/partner/timelogs/list",
    { "filters": { "project_id": "550e8400-e29b-41d4-a716-446655440000", "task_id": "660e8400-e29b-41d4-a716-446655440001", "start_date": "2024-01-01", "end_date": "2024-12-31", "is_billable": true } },
)
print(response)
```

### JavaScript

```javascript
// call() is defined on the Authentication page.
import { call } from './orangescrum.js';

const response = await call('/api/v1/partner/timelogs/list', { "filters": { "project_id": "550e8400-e29b-41d4-a716-446655440000", "task_id": "660e8400-e29b-41d4-a716-446655440001", "start_date": "2024-01-01", "end_date": "2024-12-31", "is_billable": true } });
console.log(response);
```

### PHP

```php
<?php
// call() is defined on the Authentication page.
require 'orangescrum.php';

$response = call('/api/v1/partner/timelogs/list', json_decode('{ "filters": { "project_id": "550e8400-e29b-41d4-a716-446655440000", "task_id": "660e8400-e29b-41d4-a716-446655440001", "start_date": "2024-01-01", "end_date": "2024-12-31", "is_billable": true } }', true));
print_r($response);
```

## Example response

```json
{
  "success": true,
  "message": "Timelogs retrieved successfully",
  "data": [
    {
      "timelog_id": "770e8400-e29b-41d4-a716-446655440002",
      "project_id": "550e8400-e29b-41d4-a716-446655440000",
      "task_id": "660e8400-e29b-41d4-a716-446655440001",
      "project_name": "Website Redesign",
      "task_title": "Implement user authentication",
      "task_date": "2024-01-15",
      "start_time": "09:00:00",
      "end_time": "17:00:00",
      "start_datetime": "2024-01-15 09:00:00",
      "end_datetime": "2024-01-15 17:00:00",
      "total_hours": 8.0,
      "break_time": 1.0,
      "description": "Worked on authentication module",
      "is_billable": true,
      "is_from_timer": false,
      "timesheet_flag": false,
      "task_status": "In Progress",
      "user_id": 456,
      "user_name": "John Doe",
      "created_at": "2024-01-15 18:30:00"
    }
  ]
}
```

