<turbo-stream action="update" target="wiki_3611_subpage_3744_info"><template>
<p>Logs are used to store information about every transaction run. <a href="/wiki/logs" title="Read More About Logs">Read more about Logs</a></p>
<p></p>
<table>
<thead>
<tr>
<td><strong>Field</strong></td>
<td><strong>Type</strong></td>
<td><strong>Notes</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>logdate</td>
<td>date</td>
<td></td>
</tr>
<tr>
<td>logtime</td>
<td>time</td>
<td>UTC</td>
</tr>
<tr>
<td>transfer</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>sub_transfer</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>group</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>schedule</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>source</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>destination</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>is_error</td>
<td>boolean</td>
<td></td>
</tr>
<tr>
<td>time_used</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>log_type</td>
<td>string</td>
<td>"information", "error", "transfer_control", "connection_control", "protocol_control", "communication_control", "scheduler_control", "server_control"</td>
</tr>
<tr>
<td>message_code</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>service_code</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>filename</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>run_id</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>run_type</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>read_source</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>read_destination</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>skipped_source</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>read_action</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>updated</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>inserted</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>deleted</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>source_deleted</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>initialized</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>packages_sent</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>bytes_sent</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>packages_received</td>
<td>integer</td>
<td></td>
</tr>
<tr>
<td>bytes_received</td>
<td>integer</td>
<td></td>
</tr>
</tbody>
</table>
<p></p>
<table>
<thead>
<tr>
<td>
<p><strong>Query Parameters<br></strong></p>
</td>
<td>
<p><strong>Notes</strong></p>
</td>
<td><strong>Examples <br></strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>Unique identifier of the log.</td>
<td>id=100</td>
</tr>
<tr>
<td>fromdate</td>
<td>Minimum datetime of logs to retrieve (inclusive, Accepted datetime formats are: 2020-12-01T12:12Z or 202012011212).</td>
<td>fromdate=202012011000</td>
</tr>
<tr>
<td>todate</td>
<td>Maximum datetime of logs to retrieve (inclusive, Accepted datetime formats are: 2020-12-01T12:12Z or 202012011212).</td>
<td>todate=202103011000</td>
</tr>
<tr>
<td>log_datetime</td>
<td>Exact datetime of the logs you want to retrieve (inclusive, Accepted datetime formats are: 2020-12-01T12:12:12Z or 20201201121212).</td>
<td>log_datetime=20201201100022</td>
</tr>
<tr>
<td>search</td>
<td>Finds log entries where searchable fields contain the provided value.</td>
<td>search="TEST_22"</td>
</tr>
<tr>
<td>limit</td>
<td>Maximum number of log entries to retrieve with each database query. Used for paginated results</td>
<td>limit=100</td>
</tr>
<tr>
<td>offset</td>
<td>Number of log entries the query should skip before beginning to read and apply filters, used for paginated results</td>
<td>offset=100</td>
</tr>
</tbody>
</table>
<p></p>
<table>
<thead>
<tr>
<td>
<p><strong>Searchable fields<br></strong></p>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
</tr>
<tr>
<td>description</td>
</tr>
<tr>
<td>transfercode</td>
</tr>
<tr>
<td>groupcode</td>
</tr>
</tbody>
</table>
<p></p>
<h1><strong>Filtering</strong></h1>
<p>To avoid generating queries that can overload the system, a distinction is made between indexed and non-indexed fields available for filtering:</p>
<ul>
<li>Indexed fields are optimized for searching, allowing the Database query to consume fewer resources when filtering the logs.</li>
</ul>
<ul>
<li>Filtering using non-indexed fields (as well as searching) take a heavier toll on the database, and therefore it is required to have less than 300 000 entries readable after the indexed filters are applied, or the query will return an error asking the user to restrict their query further using the indexed filters or timedate query parameters.</li>
</ul>
<p></p>
<h2><strong>Using Indexed fields:</strong></h2>
<p>Indexed fields are optimized for searching, allowing the Database query to consume less resources when filtering logs.</p>
<table>
<thead>
<tr>
<td>
<p><strong>Indexed filters<br></strong></p>
</td>
<td>
<p><strong>non_indexed filters (includes the search query term)</strong></p>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>runid</td>
<td>source</td>
</tr>
<tr>
<td>transfercode</td>
<td>destination</td>
</tr>
<tr>
<td>schedulercode</td>
<td>groupcode</td>
</tr>
<tr>
<td>logtype</td>
<td>description</td>
</tr>
<tr>
<td>iserror</td>
<td></td>
</tr>
</tbody>
</table>
<p>Pagination:Pagination uses the <em>limit</em> and <em>offset</em> parameters to separate the retrieval of large volumes of logs into smaller chunks called pages.<strong><br></strong>Setting the <em>limit</em> parameter allows us to define the page size, and setting <em>offset</em> to a multiple of<em> limit</em> sets which page we are getting back for the request.Once you've made your first query with <em>offset=0 </em>and a specific <em>limit</em>, only the <em>offset</em> parameter should vary for future requests.

</p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/rest_api_logs_get_logs?inline=1&amp;parent_page_ids=3611_3744&amp;child_page_id=3746"><img class="blindupdown_show" id="show_wiki_3611_3744_subpage_3746_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3611_3744_subpage_3746_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>REST API Logs Get Logs</div></div></div><div class="section_detail" id="wiki_3611_3744_subpage_3746_info"></div><p></p>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
