# List log entries `GET` `/api/v1/crm-connections/{crm_connection_id}/log-entries` Returns Gradient Works log entries for the given Salesforce CRM connection. Supports filtering by date range and text search across logger, flow name, request ID, and flow interview GUID fields. Default page size is 50; results are ordered by timestamp descending. Pass next_records_url from one response into the next request to paginate through large result sets. ## Path parameters | Name | Type | Required | Description | |------|------|----------|-------------| | crm_connection_id | string | yes | UUID of the CRM connection | ## Query parameters | Name | Type | Required | Description | |------|------|----------|-------------| | query | string | no | Search across log entry text fields: logger, flow name, request ID, and flow interview GUID. Requires at least 2 characters. | | start_date | string | no | Return log entries on or after this date (inclusive), formatted as YYYY-MM-DD. Filters on the log timestamp field. | | end_date | string | no | Return log entries on or before this date (inclusive), formatted as YYYY-MM-DD. Filters on the log timestamp field. | | sort_by | string | no | Field to sort by. Default: GradientWorks__Timestamp__c. | | sort_direction | string | no | ASC or DESC | | limit | string | no | Maximum number of log entries to return (default: 50). | | next_records_url | string | no | Cursor returned by a previous response to fetch the next page. When provided, all other query params are ignored. | ## Response `200 OK` — `application/json` | Field | Type | Description | |-------|------|-------------| | log_entries | array[object] | — | | log_entries.id | string | Salesforce ID of the log entry | | log_entries.name | string | Log entry record name | | log_entries.level | string | Log level (e.g. ERROR, WARN, INFO, DEBUG) | | log_entries.level_number | number | Numeric log level | | log_entries.message | string | Log message | | log_entries.logger | string | Logger name | | log_entries.context | string | Additional context | | log_entries.request_id | string | Request ID | | log_entries.flow | object | Flow context (null when the log entry was not recorded from a Salesforce Flow) | | log_entries.flow.name | string | Name of the flow that ran | | log_entries.flow.version | number | Version of the flow that ran | | log_entries.flow.version_durable_id | string | Durable ID of the flow version | | log_entries.flow.interview_guid | string | GUID of the flow interview | | log_entries.timestamp | string | Log timestamp (ISO-8601) | | log_entries.timestamp_milliseconds | number | Log timestamp in milliseconds since epoch | | log_entries.created_at | string | ISO-8601 creation timestamp | | next_records_url | string | Pass this value as next_records_url on the next request to fetch the following page. Null when all records have been returned. Only present when limit exceeds Salesforce's per-page maximum (2000 records). | ## Errors | Status | Description | |--------|-------------| | 400 | Bad Request | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 502 | Bad Gateway |