# User Action Logs

## Get Recent Administrative Logs

> Retrieves user activity logs from the last 30 days.\
> \
> This endpoint fetches logs stored in PostgreSQL (recent logs within retention period). Logs older than 30 days are archived in S3 and must be accessed via the archived-download-urls endpoint.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Query Parameters\*\*\
> \
> \| Parameter | Type | Required | Description |\
> \| --- | --- | --- | --- |\
> \| \`start\_date\` | DateTime | Yes | Start date in ISO 8601 format. E.g., \`2024-01-01T00:00:00Z\` |\
> \| \`end\_date\` | DateTime | Yes | End date in ISO 8601 format. Must be after \`start\_date\`. E.g., \`2024-01-31T23:59:59Z\` |\
> \| \`action\_type\` | String | No | Filter by action type. See action types list below |\
> \| \`user\_email\` | String | No | Filter by user email address |\
> \| \`organization\_machine\_id\` | Integer | No | Filter by machine ID |\
> \
> \### \*\*Retention Policy\*\*\
> \
> \- Logs from the last 30 days are stored in PostgreSQL (fast querying)\
> &#x20;   \
> \- Logs older than 30 days are archived in S3\
> &#x20;   \
> \- If date range extends beyond 30 days, only the recent portion is returned\
> &#x20;   \
> \- Maximum 1000 logs returned per request\
> &#x20;   \
> \
> \### \*\*Action Types\*\*\
> \
> \| Action Type | Description |\
> \| --- | --- |\
> \| \`machine\_started\` | Machine was started |\
> \| \`machine\_stopped\` | Machine was stopped |\
> \| \`machine\_reset\` | Machine was reset to factory settings |\
> \| \`machine\_type\_changed\` | Machine type was changed (upgrade/downgrade) |\
> \| \`machine\_external\_access\_created\` | External access token was created |\
> \| \`machine\_created\` | Machine was created |\
> \| \`file\_downloaded\` | File was downloaded |\
> \| \`file\_uploaded\` | File upload was completed |\
> \| \`file\_deleted\` | File or folder was deleted |\
> \| \`folder\_created\` | Folder was created |\
> \| \`user\_login\` | User logged in |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 404 | Not found |\
> \| 4221 | End date must be after start date |\
> \| 4710 | Permission required |\
> \
> \### \*\*Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`logs\` | Array | Array of log entry objects |\
> \| \`logs\[].id\` | Integer | Log entry ID |\
> \| \`logs\[].action\_type\` | String | Action type (see action types table above) |\
> \| \`logs\[].user\_id\` | Integer | User ID who performed the action |\
> \| \`logs\[].user\_email\` | String | Email address of user who performed the action |\
> \| \`logs\[].machine\_id\` | Integer | Machine ID (organization\_machine\_id). null if action not related to a machine |\
> \| \`logs\[].metadata\` | Object | Additional metadata specific to the action type. Structure varies by action |\
> \| \`logs\[].created\_at\` | String | ISO 8601 timestamp when log was created |\
> \| \`logs\[].updated\_at\` | String | ISO 8601 timestamp when log was last updated |\
> \| \`count\` | Integer | Total number of logs returned (max 1000) |\
> \| \`start\_date\` | String | Start date used in query (ISO 8601) |\
> \| \`end\_date\` | String | End date used in query (ISO 8601) |\
> \| \`note\` | String | Optional note if date range extends beyond retention period |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \#### \*\*Metadata Examples by Action Type\*\*\
> \
> \- \*\*machine\_started\*\*: \`{ "machine\_type\_id": 1, "machine\_type\_name": "Standard", "region": "dublin" }\`\
> &#x20;   \
> \- \*\*machine\_type\_changed\*\*: \`{ "old\_machine\_type\_id": 1, "new\_machine\_type\_id": 2, "machine\_type\_name": "Performance" }\`\
> &#x20;   \
> \- \*\*file\_deleted\*\*: \`{ "file\_id": 123, "file\_name": "document.pdf", "file\_size": 1048576, "file\_content\_type": "application/pdf", "is\_shared": false, "object\_type": "file" }\`\
> &#x20;   \
> \- \*\*file\_uploaded\*\*: \`{ "file\_id": 123, "file\_name": "document.pdf", "file\_size": 1048576 }\`\
> &#x20;   \
> \
> \### \*\*Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20; "logs": \[\
> &#x20;   {\
> &#x20;     "id": 1,\
> &#x20;     "action\_type": "machine\_started",\
> &#x20;     "user\_id": 123,\
> &#x20;     "user\_email": "<user@example.com>",\
> &#x20;     "machine\_id": 456,\
> &#x20;     "metadata": {\
> &#x20;       "machine\_type\_id": 1,\
> &#x20;       "machine\_type\_name": "Standard",\
> &#x20;       "region": "dublin"\
> &#x20;     },\
> &#x20;     "created\_at": "2024-01-15T10:30:00Z",\
> &#x20;     "updated\_at": "2024-01-15T10:30:00Z"\
> &#x20;   },\
> &#x20;   {\
> &#x20;     "id": 2,\
> &#x20;     "action\_type": "file\_deleted",\
> &#x20;     "user\_id": 123,\
> &#x20;     "user\_email": "<user@example.com>",\
> &#x20;     "machine\_id": 456,\
> &#x20;     "metadata": {\
> &#x20;       "file\_id": 789,\
> &#x20;       "file\_name": "document.pdf",\
> &#x20;       "file\_size": 1048576,\
> &#x20;       "file\_content\_type": "application/pdf",\
> &#x20;       "is\_shared": false,\
> &#x20;       "object\_type": "file"\
> &#x20;     },\
> &#x20;     "created\_at": "2024-01-15T11:00:00Z",\
> &#x20;     "updated\_at": "2024-01-15T11:00:00Z"\
> &#x20;   }\
> &#x20; ],\
> &#x20; "count": 150,\
> &#x20; "start\_date": "2024-01-01T00:00:00Z",\
> &#x20; "end\_date": "2024-01-31T23:59:59Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Note\*\*\
> \
> For logs older than 30 days, use the \`archived-download-urls\` endpoint. If the date range extends beyond the retention period, the response will include a \`note\` field indicating to use the archived endpoint.

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.6"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/user-action-logs":{"get":{"summary":"Get Recent Administrative Logs","responses":{"200":{"description":"User action logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionLogsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404Response"}}}},"4221":{"description":"End date must be after start date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4221Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}}},"parameters":[{"name":"start_date","in":"query","description":"(Required) Start date. ISO 8601 format (e.g., 2024-01-01T00:00:00Z)","schema":{"type":"string"}},{"name":"end_date","in":"query","description":"(Required) End date. ISO 8601 format. Must be after start_date.","schema":{"type":"string"}},{"name":"action_type","in":"query","description":"(Optional) Action type filter. E.g., machine_started, machine_stopped, file_downloaded","schema":{"type":"string"}},{"name":"user_email","in":"query","description":"(Optional) Filter by user email","schema":{"type":"string"}},{"name":"organization_machine_id","in":"query","description":"(Optional) Filter by machine ID","schema":{"type":"string"}}],"tags":["User Action Logs"],"description":"Retrieves user activity logs from the last 30 days.\n\nThis endpoint fetches logs stored in PostgreSQL (recent logs within retention period). Logs older than 30 days are archived in S3 and must be accessed via the archived-download-urls endpoint.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Query Parameters**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `start_date` | DateTime | Yes | Start date in ISO 8601 format. E.g., `2024-01-01T00:00:00Z` |\n| `end_date` | DateTime | Yes | End date in ISO 8601 format. Must be after `start_date`. E.g., `2024-01-31T23:59:59Z` |\n| `action_type` | String | No | Filter by action type. See action types list below |\n| `user_email` | String | No | Filter by user email address |\n| `organization_machine_id` | Integer | No | Filter by machine ID |\n\n### **Retention Policy**\n\n- Logs from the last 30 days are stored in PostgreSQL (fast querying)\n    \n- Logs older than 30 days are archived in S3\n    \n- If date range extends beyond 30 days, only the recent portion is returned\n    \n- Maximum 1000 logs returned per request\n    \n\n### **Action Types**\n\n| Action Type | Description |\n| --- | --- |\n| `machine_started` | Machine was started |\n| `machine_stopped` | Machine was stopped |\n| `machine_reset` | Machine was reset to factory settings |\n| `machine_type_changed` | Machine type was changed (upgrade/downgrade) |\n| `machine_external_access_created` | External access token was created |\n| `machine_created` | Machine was created |\n| `file_downloaded` | File was downloaded |\n| `file_uploaded` | File upload was completed |\n| `file_deleted` | File or folder was deleted |\n| `folder_created` | Folder was created |\n| `user_login` | User logged in |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 404 | Not found |\n| 4221 | End date must be after start date |\n| 4710 | Permission required |\n\n### **Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `logs` | Array | Array of log entry objects |\n| `logs[].id` | Integer | Log entry ID |\n| `logs[].action_type` | String | Action type (see action types table above) |\n| `logs[].user_id` | Integer | User ID who performed the action |\n| `logs[].user_email` | String | Email address of user who performed the action |\n| `logs[].machine_id` | Integer | Machine ID (organization_machine_id). null if action not related to a machine |\n| `logs[].metadata` | Object | Additional metadata specific to the action type. Structure varies by action |\n| `logs[].created_at` | String | ISO 8601 timestamp when log was created |\n| `logs[].updated_at` | String | ISO 8601 timestamp when log was last updated |\n| `count` | Integer | Total number of logs returned (max 1000) |\n| `start_date` | String | Start date used in query (ISO 8601) |\n| `end_date` | String | End date used in query (ISO 8601) |\n| `note` | String | Optional note if date range extends beyond retention period |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n#### **Metadata Examples by Action Type**\n\n- **machine_started**: `{ \"machine_type_id\": 1, \"machine_type_name\": \"Standard\", \"region\": \"dublin\" }`\n    \n- **machine_type_changed**: `{ \"old_machine_type_id\": 1, \"new_machine_type_id\": 2, \"machine_type_name\": \"Performance\" }`\n    \n- **file_deleted**: `{ \"file_id\": 123, \"file_name\": \"document.pdf\", \"file_size\": 1048576, \"file_content_type\": \"application/pdf\", \"is_shared\": false, \"object_type\": \"file\" }`\n    \n- **file_uploaded**: `{ \"file_id\": 123, \"file_name\": \"document.pdf\", \"file_size\": 1048576 }`\n    \n\n### **Response Example**\n\n``` json\n{\n  \"logs\": [\n    {\n      \"id\": 1,\n      \"action_type\": \"machine_started\",\n      \"user_id\": 123,\n      \"user_email\": \"user@example.com\",\n      \"machine_id\": 456,\n      \"metadata\": {\n        \"machine_type_id\": 1,\n        \"machine_type_name\": \"Standard\",\n        \"region\": \"dublin\"\n      },\n      \"created_at\": \"2024-01-15T10:30:00Z\",\n      \"updated_at\": \"2024-01-15T10:30:00Z\"\n    },\n    {\n      \"id\": 2,\n      \"action_type\": \"file_deleted\",\n      \"user_id\": 123,\n      \"user_email\": \"user@example.com\",\n      \"machine_id\": 456,\n      \"metadata\": {\n        \"file_id\": 789,\n        \"file_name\": \"document.pdf\",\n        \"file_size\": 1048576,\n        \"file_content_type\": \"application/pdf\",\n        \"is_shared\": false,\n        \"object_type\": \"file\"\n      },\n      \"created_at\": \"2024-01-15T11:00:00Z\",\n      \"updated_at\": \"2024-01-15T11:00:00Z\"\n    }\n  ],\n  \"count\": 150,\n  \"start_date\": \"2024-01-01T00:00:00Z\",\n  \"end_date\": \"2024-01-31T23:59:59Z\"\n}\n\n ```\n\n### **Note**\n\nFor logs older than 30 days, use the `archived-download-urls` endpoint. If the date range extends beyond the retention period, the response will include a `note` field indicating to use the archived endpoint."}}},"components":{"schemas":{"UserActionLogsResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"logs":{"type":"array","description":"List of user action logs","items":{"$ref":"#/components/schemas/UserActionLog"}},"count":{"type":"integer","description":"Total number of logs"},"start_date":{"type":"string","format":"date-time","description":"Query start date"},"end_date":{"type":"string","format":"date-time","description":"Query end date"},"note":{"type":"string","nullable":true,"description":"Additional notes about the response"}}}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"UserActionLog":{"type":"object","description":"Record of a user action in the system","properties":{"id":{"type":"integer","description":"Log entry ID"},"action_type":{"type":"string","enum":["machine_started","machine_stopped","machine_reset","machine_type_changed","machine_external_access_created","machine_created","file_downloaded","file_uploaded","file_deleted","folder_created","user_login"],"description":"Type of action performed"},"user_id":{"type":"integer","description":"ID of the user who performed the action"},"user_email":{"type":"string","description":"Email of the user who performed the action"},"machine_id":{"type":"integer","nullable":true,"description":"Associated machine ID (if applicable)"},"metadata":{"type":"object","additionalProperties":true,"description":"Additional action-specific metadata"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the action occurred"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the log entry was last updated"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error404Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4221Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````

## Get Archived Administrative Logs

> Generates presigned S3 download URLs for archived logs older than 30 days.\
> \
> This endpoint provides download URLs for logs that have been archived to S3. Logs are archived monthly, so each URL typically contains one month of logs.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Query Parameters\*\*\
> \
> \| Parameter | Type | Required | Default | Description |\
> \| --- | --- | --- | --- | --- |\
> \| \`start\_date\` | DateTime | Yes | \\- | Start date in ISO 8601 format. Must be older than 30 days. E.g., \`2023-01-01T00:00:00Z\` |\
> \| \`end\_date\` | DateTime | Yes | \\- | End date in ISO 8601 format. Must be older than 30 days. Must be after \`start\_date\`. E.g., \`2023-12-31T23:59:59Z\` |\
> \| \`expires\_in\` | Integer | No | 600 | Presigned URL validity duration in seconds. Default: 600 (10 minutes). Maximum recommended: 3600 (1 hour) |\
> \
> \##### \*\*Restrictions\*\*\
> \
> \- Can only be used for logs older than 30 days\
> &#x20;   \
> \- Use the main \`/user-action-logs\` endpoint for logs from the last 30 days\
> &#x20;   \
> \- Date range must be entirely within the archived period\
> &#x20;   \
> \
> \##### \*\*Validation\*\*\
> \
> \- \`end\_date\` must be after \`start\_date\`\
> &#x20;   \
> \- Both dates must be older than 30 days\
> &#x20;   \
> \- Both dates must be in the past\
> &#x20;   \
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 4222 | This endpoint is for archived logs only |\
> \| 4710 | Permission required |\
> \
> \*\*Response Fields:\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`download\_urls\` | Array | Array of presigned S3 download URLs. Each URL typically contains one month of logs |\
> \| \`download\_urls\[]\` | String | Presigned S3 URL for downloading archived log file. URL expires after \`expires\_in\` seconds |\
> \| \`count\` | Integer | Number of download URLs generated |\
> \| \`start\_date\` | String | Start date used in query (ISO 8601) |\
> \| \`end\_date\` | String | End date used in query (ISO 8601) |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \*\*Response Example:\*\*\
> \
> \`\`\` json\
> {\
> &#x20; "download\_urls": \[\
> &#x20;   "<https://s3.amazonaws.com/vagon-logs/org-123/2023-01.json.gz?X-Amz-Signature=abc123...\\&X-Amz-Expires=600",\\>
> &#x20;   "<https://s3.amazonaws.com/vagon-logs/org-123/2023-02.json.gz?X-Amz-Signature=def456...\\&X-Amz-Expires=600",\\>
> &#x20;   "<https://s3.amazonaws.com/vagon-logs/org-123/2023-03.json.gz?X-Amz-Signature=ghi789...\\&X-Amz-Expires=600"\\>
> &#x20; ],\
> &#x20; "count": 12,\
> &#x20; "start\_date": "2023-01-01T00:00:00Z",\
> &#x20; "end\_date": "2023-12-31T23:59:59Z",\
> &#x20; "client\_code": 200,\
> &#x20; "message": "OK",\
> &#x20; "timestamp": "2026-02-05T10:00:00Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \*\*Usage Instructions:\*\*\
> \
> 1\. \*\*Download Files\*\*: Make HTTP GET requests to each URL in \`download\_urls\` array\
> &#x20;   \
> 2\. \*\*File Format\*\*: Files are in \`.json.gz\` format (gzip-compressed JSON)\
> &#x20;   \
> 3\. \*\*Content\*\*: Each file typically contains one month of logs in JSON format\
> &#x20;   \
> 4\. \*\*Decompression\*\*: Decompress the \`.gz\` files to get JSON data\
> &#x20;   \
> 5\. \*\*URL Expiration\*\*: URLs expire after \`expires\_in\` seconds (default 10 minutes)\
> &#x20;   \
> 6\. \*\*Download Timing\*\*: Download all URLs promptly after receiving the response\
> &#x20;   \
> \
> \*\*File Structure:\*\*  \
> Each downloaded file contains an array of log objects with the same structure as the main endpoint response.

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.6"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/user-action-logs/archived-download-urls":{"get":{"summary":"Get Archived Administrative Logs","responses":{"200":{"description":"Archived log download URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchivedLogsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"4222":{"description":"This endpoint is for archived logs only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4222Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}}},"parameters":[{"name":"start_date","in":"query","description":"(Required) Start date. Must be older than 30 days.","schema":{"type":"string"}},{"name":"end_date","in":"query","description":"(Required) End date. Must be older than 30 days.","schema":{"type":"string"}},{"name":"expires_in","in":"query","description":"(Optional) URL validity duration (seconds). Default: 600 (10 minutes)","schema":{"type":"integer"}}],"tags":["User Action Logs"],"description":"Generates presigned S3 download URLs for archived logs older than 30 days.\n\nThis endpoint provides download URLs for logs that have been archived to S3. Logs are archived monthly, so each URL typically contains one month of logs.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Query Parameters**\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `start_date` | DateTime | Yes | \\- | Start date in ISO 8601 format. Must be older than 30 days. E.g., `2023-01-01T00:00:00Z` |\n| `end_date` | DateTime | Yes | \\- | End date in ISO 8601 format. Must be older than 30 days. Must be after `start_date`. E.g., `2023-12-31T23:59:59Z` |\n| `expires_in` | Integer | No | 600 | Presigned URL validity duration in seconds. Default: 600 (10 minutes). Maximum recommended: 3600 (1 hour) |\n\n##### **Restrictions**\n\n- Can only be used for logs older than 30 days\n    \n- Use the main `/user-action-logs` endpoint for logs from the last 30 days\n    \n- Date range must be entirely within the archived period\n    \n\n##### **Validation**\n\n- `end_date` must be after `start_date`\n    \n- Both dates must be older than 30 days\n    \n- Both dates must be in the past\n    \n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 4222 | This endpoint is for archived logs only |\n| 4710 | Permission required |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `download_urls` | Array | Array of presigned S3 download URLs. Each URL typically contains one month of logs |\n| `download_urls[]` | String | Presigned S3 URL for downloading archived log file. URL expires after `expires_in` seconds |\n| `count` | Integer | Number of download URLs generated |\n| `start_date` | String | Start date used in query (ISO 8601) |\n| `end_date` | String | End date used in query (ISO 8601) |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n**Response Example:**\n\n``` json\n{\n  \"download_urls\": [\n    \"https://s3.amazonaws.com/vagon-logs/org-123/2023-01.json.gz?X-Amz-Signature=abc123...&X-Amz-Expires=600\",\n    \"https://s3.amazonaws.com/vagon-logs/org-123/2023-02.json.gz?X-Amz-Signature=def456...&X-Amz-Expires=600\",\n    \"https://s3.amazonaws.com/vagon-logs/org-123/2023-03.json.gz?X-Amz-Signature=ghi789...&X-Amz-Expires=600\"\n  ],\n  \"count\": 12,\n  \"start_date\": \"2023-01-01T00:00:00Z\",\n  \"end_date\": \"2023-12-31T23:59:59Z\",\n  \"client_code\": 200,\n  \"message\": \"OK\",\n  \"timestamp\": \"2026-02-05T10:00:00Z\"\n}\n\n ```\n\n**Usage Instructions:**\n\n1. **Download Files**: Make HTTP GET requests to each URL in `download_urls` array\n    \n2. **File Format**: Files are in `.json.gz` format (gzip-compressed JSON)\n    \n3. **Content**: Each file typically contains one month of logs in JSON format\n    \n4. **Decompression**: Decompress the `.gz` files to get JSON data\n    \n5. **URL Expiration**: URLs expire after `expires_in` seconds (default 10 minutes)\n    \n6. **Download Timing**: Download all URLs promptly after receiving the response\n    \n\n**File Structure:**  \nEach downloaded file contains an array of log objects with the same structure as the main endpoint response."}}},"components":{"schemas":{"ArchivedLogsResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"download_urls":{"type":"array","description":"List of URLs to download archived log files","items":{"type":"string","format":"uri"}},"count":{"type":"integer","description":"Total number of download URLs"},"start_date":{"type":"string","format":"date-time","description":"Query start date"},"end_date":{"type":"string","format":"date-time","description":"Query end date"}}}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error4222Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vagon.io/teams/reference/user-action-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
