Platform Data Dictionary | Yext Hitchhikers Platform
Use these views to get a log of your Content Delivery and Management API requests, as well as other platform resource usage.
API Requests
platform.api_requests
This view contains a log of all API requests for Management APIs. There is a 30-day lookback period for API requests, rather than the standard one year lookback for fact tables.
Column | Data Type | Description |
---|---|---|
subject_business_id |
NUMBER |
The numeric identifier for the account that is the subject of the API call. |
app_business_id |
NUMBER |
The numeric identifier for the account that is the owner of the app making the request. Keep in mind that the owner of the app and the subject of the API call may not always be the same account. For instance, a reseller may have an app created at the parent level making API requests for its child accounts. |
uuid |
VARCHAR |
The unique ID associated with the request |
request_timestamp |
TIMESTAMP_NTZ |
The time the request was made |
app_id |
NUMBER |
The app associated with the request |
endpoint_id |
NUMBER |
The ID of the API endpoint being accessed |
version |
NUMBER |
The API version corresponding to the ‘v’ parameter specified in the request |
request_url |
VARCHAR |
The URL of the request |
method |
VARCHAR |
The HTTP method of the request |
status_code |
NUMBER |
The status code of the response |
request_headers |
OBJECT |
The headers of the request |
request_body |
VARCHAR |
The body of the request |
request_bytes |
NUMBER |
The size of the request, in bytes |
duration_milliseconds |
NUMBER |
The duration of time required to process the request |
response_headers |
OBJECT |
The headers of the response |
response_body |
VARCHAR |
The body of the response |
response_bytes |
NUMBER |
The size of the response, in bytes |
is_truncated |
BOOLEAN |
Whether the log was truncated due to size constraints |
errors |
ARRAY |
Any errors encountered while processing the request |
Sample Queries
Get all Management API requests and associated metadata for the past seven days.
select
uuid,
request_timestamp,
app_id,
endpoint_id,
status_code,
request_url,
request_body,
duration_milliseconds,
response_body,
errors
from platform.api_requests
where date(request_timestamp) > dateadd(day, -8, current_date)
Apps
platform.apps
This view contains information about your Yext developer apps. This can be used to decode the app_id
column in other platform
views.
Column | Data Type | Description |
---|---|---|
business_id |
NUMBER |
The numeric identifier for the account |
app_id |
NUMBER |
The numeric identifier for the app |
display_name |
VARCHAR |
The app name |
has_write_access |
BOOLEAN |
Whether the app has write permissions |
directory_status |
VARCHAR |
Whether the app is published to the app directory. Can be one of PRIVATE, PUBLISHED, PUBLISHED_WITH_CHANGES, or SUBMITTED |
is_internal |
BOOLEAN |
Whether the app is internal. Internal apps are not subject to API quota |
receives_subaccount_webhooks |
BOOLEAN |
Whether the webhooks in a given app are configured to receive webhook events from any sub-accounts |
distribution_intent |
VARCHAR |
Whether the app distribution intent is private (no distribution among other Yext accounts) or public on the Yext app directory |
Sample Queries
Get all consumer API calls from the last 7 days, using the apps view to decode which apps made the requests.
select
uuid,
request_timestamp,
consumer_api_requests.app_id,
apps.display_name
endpoint_id,
status_code,
request_url,
request_body,
duration_milliseconds,
response_body,
errors
from platform.consumer_api_requests
join platform.apps using (app_id)
where date(request_timestamp) > dateadd(day, -8, current_date)
Consumer API Requests
platform.consumer_api_requests
This view contains a log of all API requests for Content Delivery and other consumer-facing APIs. There is a 30-day lookback period for API requests.
Column | Data Type | Description |
---|---|---|
subject_business_id |
NUMBER |
The numeric identifier for the account that is the subject of the API call. |
app_business_id |
NUMBER |
The numeric identifier for the account that is the owner of the app making the request. Keep in mind that the owner of the app and the subject of the API call may not always be the same account. For instance, a reseller may have an app created at the parent level making API requests for its child accounts. |
uuid |
VARCHAR |
The unique ID associated with the request |
request_timestamp |
TIMESTAMP_NTZ |
The time the request was made |
app_id |
NUMBER |
The app associated with the request |
endpoint_id |
NUMBER |
The ID of the API endpoint being accessed |
version |
NUMBER |
The API version corresponding to the ‘v’ parameter specified in the request |
request_url |
VARCHAR |
The URL of the request |
method |
VARCHAR |
The HTTP method of the request |
status_code |
NUMBER |
The status code of the response |
request_headers |
OBJECT |
The headers of the request |
request_body |
VARCHAR |
The body of the request |
request_bytes |
NUMBER |
The size of the request, in bytes |
duration_milliseconds |
NUMBER |
The duration of time required to process the request |
response_headers |
OBJECT |
The headers of the response |
response_body |
VARCHAR |
The body of the response |
response_bytes |
NUMBER |
The size of the response, in bytes |
is_truncated |
BOOLEAN |
Whether the log was truncated due to size constraints |
errors |
ARRAY |
Any errors encountered while processing the request |
Sample Queries
Get all Content Delivery API requests that received a 404 status code for the past seven days.
select
uuid,
request_timestamp,
app_id,
endpoint_id,
request_url,
request_body,
duration_milliseconds,
response_body,
errors
from platform.consumer_api_requests
where date(request_timestamp) > dateadd(day, -8, current_date)
and status_code = 404
Endpoints
platform.endpoints
This view contains all Yext API endpoint IDs and their names, meant to be used for decoding the endpoint_ID
column in other platform views.
Column | Data Type | Description |
---|---|---|
endpoint_id |
NUMBER |
The numeric identifier of the API endpoint |
name |
VARCHAR |
The endpoint name |
Sample Queries
Get a count of all Management API calls from the last 7 days by endpoint, using the endpoints
view to decode which endpoints these requests were sent to.
select
api_requests.endpoint_id,
endpoints.name,
count(*)
from platform.api_requests
join platform.endpoints using (endpoint_id)
where date(request_timestamp) > dateadd(day, -8, current_date)
group by 1,2 order by 3 desc
Function Invocations
platform.function_invocations
This view contains a log history of function invocations associated with plugins. It can be useful as an audit log for performance tracking purposes.
Column | Data Type | Description |
---|---|---|
business_id |
NUMBER |
The numeric identifier of the account |
plugin_external_id |
VARCHAR |
The plugin’s string identifier ($id) |
invocation_id |
VARCHAR(26) |
The alphanumeric identifier of the invocation, which is an autogenerated ULID |
invocation_timestamp |
TIMESTAMP_NTZ |
The timestamp at which the invocation began |
function_name |
VARCHAR |
The name of the function invoked |
argument_json |
VARIANT |
The JSON object passed into the function as an argument |
argument_bytes |
NUMBER |
The size of the argument JSON object, in bytes |
result_json |
VARIANT |
The JSON body of the result returned by the function |
result_bytes |
NUMBER |
The size of the result JSON, in bytes |
load_duration_milliseconds |
NUMBER |
The time spent loading the plugin, in milliseconds, or 0 if the plugin was already loaded |
invoke_duration_milliseconds |
NUMBER |
The time it took for the function invocation to execute, in milliseconds |
alloc_memory_mb |
NUMBER |
The amount of memory allocated to the plugin, in megabytes |
logs |
ARRAY |
JSON array of log records |
queue_duration_milliseconds |
NUMBER |
Time elapsed between the time the plugin is ready and executing the function, in milliseconds |
tags |
OBJECT |
Additional key-values provided by the caller |
disabled_logging |
ARRAY |
Specific plugin properties that are omitted from logging |
caller_type |
VARCHAR |
The type of caller invoking the plugin, e.g. “CONNECTOR_SOURCE” |
is_truncated |
BOOLEAN |
If true, indicates something was truncated to fit into a Kafka message |
error |
OBJECT |
Structured value containing any errors while processing the request |
Sample Queries
Get a log of all function invocations for a given plugin today. Add a where clause to filter the results to a given plugin ID.
select
businesses.business_id,
name,
invocation_timestamp,
plugin_external_id,
argument_json,
logs,
case
when error is not null then 'FAILED'
else 'SUCCESS'
end as status, -- Indicate whether an invocation succeeded or failed based on the error message
caller_type,
error
from logs.function_invocations
join public.businesses using (business_id)
where plugin_external_id like '%somePluginName%'
and invocation_timestamp > current_date()
order by 3 desc;