Yext logs give you visibility into requests made through your apps and into Function executions across the platform. This article covers both: viewing and filtering API request logs for an app, and reviewing detailed Function invocation logs.
View API Request Logs
Yext logs each request made to the Management API and stores it in your Developer Console for 30 days. Yext doesn't currently store logs for requests made to the Content Delivery API. Logs make it easy to troubleshoot API requests and confirm the data passed to or from Yext through the API. For details on rate limits and API error responses, see the Quotas and Rate Limits documentation.
To view logs for an app, go to the Developer Console, locate the app you want to inspect, and select View App Logs. You can do this in any of the following ways:
- Click View App API Logs in the drop-down next to the app's name in the Developer Console.
- Click View App API Logs from within the app itself.
- From the App Details page, click View App Logs under the app name at the top of the page.
Use the filters on the left side of the page to review requests made to a specific endpoint, or requests that returned a specific status (for example, a 200 success code). Click Expand to see the details for a call, and click Export to export all logs.
Note: If you know the UUID (Universally Unique Identifier) of a request, use the search bar at the top of the page to locate it directly.
View Function Invocation Logs
Function logs let you view details about each Function execution in your account. Developers can write TypeScript functions, hosted and run within Yext, to run custom logic. These serverless Functions can be called from systems throughout the platform, including Pages, Connectors, and Serverless Functions in Apps, and their logs are all accessible in one place.
Function Logs UI
To view functions logs, click Logs in the left navigation bar under Developer.
The Function Logs UI offers a split-screen view: the left side lists individual Function invocations, and the right side shows details for the selected invocation. Invocations appear in descending chronological order, grouped by date.
Left panel: Function invocations
Each invocation appears as a row, showing:
| Information | Details |
|---|---|
| Status (for source and transform) | Whether the invocation succeeded or failed. Failures include system-wide errors, where the Function wasn't properly invoked, and uncaught errors from the Function itself. Any invocation error results in a Failure status. |
| Plugin ID | The ID of the plugin containing the invoked Function. |
| Function Name | The name of the invoked Function. |
| Caller | The system that invoked the Function, such as Pages, Connector Transform, Connector Source, or Serverless Functions in Apps. |
| Timestamp | The time of the invocation. Rows are grouped by date, most recent first. |
Right panel: invocation details
Five tabs show details for the selected invocation:
General
| Information | Description |
|---|---|
| Invocation UID | The system-generated unique ID of the invocation. |
| Region | The data region where the Function ran. |
| Queue Duration | The length of time the Function spent in the queue before running. |
| Argument Bytes | The size of the argument passed to the Function, in bytes. |
| Argument JSON | The JSON argument passed to the Function. |
Runtime
| Information | Description |
|---|---|
| Load Duration | The time (in milliseconds) it took to load the Function and its dependencies before runtime began. Not counted against the invocation time limit. |
| Runtime Duration | The time (in milliseconds) the Function spent running. |
| Logs | Console output the Function produced during the run (for example, console.log, console.warn, or console.error), including any caught errors. Uncaught errors appear in the Response tab instead. |
Response
| Information | Description |
|---|---|
| Result Bytes | The size of the Function's output, in bytes. |
| Result JSON | The JSON object returned by the Function. |
| Errors | Any uncaught errors or invoking-system errors from the invocation. |
Caller Details
Shows details specific to the calling system, such as Connector information or Pages deploy information. Details vary by caller. Current callers include:
- Connector Transform
- Connector Source
- Search Query Rule
- Pages HTTP Function
- Pages Event-Driven Function
- Webhook
Function Fetches
A Function Fetch is an HTTP request made during a Function's execution. Each fetch includes:
| Information | Description |
|---|---|
| Fetch UID | The unique ID for the fetch. |
| Fetch Timestamp | The time the fetch was executed. |
| URL | The URL the fetch was sent to. |
| HTTP Method | The HTTP method used. |
| Duration | The total duration (in milliseconds) of the fetch. |
| Request Bytes | The size of the fetch request, in bytes. |
| Response Bytes | The size of the fetch response, in bytes. |
| Status Code | The HTTP status code of the request. |
| Error Message | Any error message from the response, if present. |
Note: HTTP requests made to download packages aren't included as fetches. For example, importing from a CDN doesn't appear as a fetch for the invocation.
Filter Function Logs
Filter the function logs table by:
| Property | Filter Type |
|---|---|
| Status | Success / Failure |
| Plugin ID | Contains search |
| Function Name | Contains search |
| Invocation UID | Matches search |
| Caller | Multi-select |
| Caller Details | Key/value pair. True if the specified key contains the specified value. Multiple pairs are AND joined. |
| Timestamp | Time range |
| Search JSON | Searches for text in the Argument, Logs, or Result JSON. |
When using Search JSON, the search text must match either a key or a value in the JSON, not both together. For example, given:
{
"name": "John Smith"
}These searches return this invocation: John Smith, John, hn Smith, name.
These searches return no results: "name": "John", "name": "John Smith".
Access Function Logs via the Logs API
Query function logs through two tables in the Logs API's POST query endpoint:
-
functionInvocations: invocation details, including general, runtime, response, and caller information. -
functionFetches: function fetch details.
Before querying, configure an app in the Developer Console and set the Logs endpoint permissions to Read-Only. You also need your API key.
Function Invocations
Request:
POST https://api.yext.com/v2/accounts/{businessID}/logs/tables/functionInvocations/query?api_key={apiKey}&v={YYYYMMDD}Payload:
{
"fields": ["*"],
"pageSize": 1,
"filter": "functionName.containsAnyCase('myfunction')"
}Function Fetches
Request:
POST https://api.yext.com/v2/accounts/{businessID}/logs/tables/functionFetches/query?api_key={apiKey}&v={YYYYMMDD}Payload:
{
"fields": ["*"],
"pageSize": 10,
"descending": "true",
"filter": "invocation.uid == '01GSBB3YVDTNH3QVR89NGMNE0C'"
}Logs API vs. UI
| Function Logs via Logs API | Function Logs UI | |
|---|---|---|
| Requires a developer app | Yes | No |
| Filterable | Yes | Yes (more limited) |
| Invocations max page size | 1,000 (50 default) | 20 per "Load More" click |
| Function Fetches max page size | 1,000 (50 default) | 50 |
Limitations
- The Function Logs UI and API only include data from the last 30 days.
- New logs can take up to 5 minutes to appear in the UI and Logs API.
- If a value is truncated, it's replaced with an empty value in the UI and API. Truncation happens when an entire invocation exceeds 1 MB. Yext truncates data in order, starting with Logs, then the error response, then Status, then Result, until the invocation is under 1 MB.