> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-21.md).

# Logs tables

{% hint style="info" %}
Generated from the staging database schema, with descriptions drafted by agents ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/db/tables/viewpoint-21.md).
{% endhint %}

## Description

Application and API logs, rate limits and blocked IP addresses, the work queues, the cache and the throttling rules.

## Tables

| Name                                                                                                                                 | Columns | Comment                                                                                                                                                                                                                                                                                | Type       |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [cache](https://docs.snapfix.com/engineering-reference/db/tables/cache.md)                                                           | 3       | Laravel's database cache store (key, value, expiry). Empty on staging, but api\_php\_live\_v2's shared cache store defaults to this table, so production may use it.                                                                                                                   | BASE TABLE |
| [failed\_jobs](https://docs.snapfix.com/engineering-reference/db/tables/failed_jobs.md)                                              | 7       | One failed Laravel queue job of api\_php\_live\_v2, with its connection, queue, payload and exception. Nearly all rows are on the logging queue, and no code prunes the table.                                                                                                         | BASE TABLE |
| [log\_webadminapp](https://docs.snapfix.com/engineering-reference/db/tables/log_webadminapp.md)                                      | 13      | One action logged by the old web admin app: the acting user, the action name and description, and details as JSON. apipy's /logswebappadmin endpoints read and write it, no client calls them, and no row is newer than 2022-06.                                                       | BASE TABLE |
| [tPri\_JobTag\_Log](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtag_log.md)                                     | 10      | One task tag change made by a tag folder merge (web account settings, Manage tags), with the old and new tag and folder, so that an admin can undo the merge.                                                                                                                          | BASE TABLE |
| [tPri\_Log](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log.md)                                                    | 12      | A general activity log line about a group, a user or a task. Some password changes write the new password here.                                                                                                                                                                        | BASE TABLE |
| [tPri\_Log\_API\_IP\_RateLimit](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_api_ip_ratelimit.md)               | 16      | One API call counted by the rate limit: the action, the caller's device, user, IP and location, and whether it was blocked.                                                                                                                                                            | BASE TABLE |
| [tPri\_Log\_API\_Serialized\_Response](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_api_serialized_response.md) | 10      | A saved API response for a logged call: the event, a public and a private message and metadata; php-apis, the Laravel API, apipy and authpy write it.                                                                                                                                  | BASE TABLE |
| [tPri\_Log\_DDOS\_Usage\_Pattern](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_ddos_usage_pattern.md)           | 23      | A copy of the IP check row (tPri\_Log\_IP\_Blocked) for the first request of each check, with the request headers and the decoded token claims; php-apis writes it. Empty on staging.                                                                                                  | BASE TABLE |
| [tPri\_Log\_IP\_Blocked](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_ip_blocked.md)                            | 19      | One request checked by the IP block rules, with the caller's IP and country, whether it was blocked and why; php-apis, authpy and apipy have code that writes it. Empty on staging.                                                                                                    | BASE TABLE |
| [tPri\_Log\_Network](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_network.md)                                   | 81      | A network flow record (endpoints, ports, timing, packet and flag counts, traffic label); php-apis has an action that writes it. Empty on staging.                                                                                                                                      | BASE TABLE |
| [tPri\_Log\_StartAppUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_startappuser.md)                         | 8       | A row each time a user starts the app, with the app version and the IP lookup data.                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_Queue](https://docs.snapfix.com/engineering-reference/db/tables/tpri_queue.md)                                                | 13      | One change logged for a site's devices, with the table that changed, the changed row as JSON and who made it. Rows are written only when the queue flags are on \[[ASK-12](https://github.com/snapfix/docs/blob/main/ASK.md#ask-12-which-settings-do-the-production-api-servers-use)]. | BASE TABLE |
| [throttling\_rules](https://docs.snapfix.com/engineering-reference/db/tables/throttling_rules.md)                                    | 14      | One rate limit for a route and app version: the calls allowed within a time span. The Laravel API's rate limiter applies the active rules only while throttling is switched on; the newest row is from 2025-01.                                                                        | BASE TABLE |

## Relations

```mermaid
erDiagram


"cache" {
}
"failed_jobs" {
}
"log_webadminapp" {
}
"tPri_JobTag_Log" {
}
"tPri_Log" {
}
"tPri_Log_API_IP_RateLimit" {
}
"tPri_Log_API_Serialized_Response" {
}
"tPri_Log_DDOS_Usage_Pattern" {
}
"tPri_Log_IP_Blocked" {
}
"tPri_Log_Network" {
}
"tPri_Log_StartAppUser" {
}
"tPri_Queue" {
}
"throttling_rules" {
}
```

***

> Generated by [tbls](https://github.com/k1LoW/tbls)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-21.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
