---
sourceDocument: Zurich API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/zurich/api-reference

 Release :

    - zurich

ft:locale :

    - en-US

ft:publication_title :

    - Zurich API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Analytics collection and cleanup

# REST and SOAP API analytics collection and cleanup {#ariaid-title1}

* Release version: Zurich
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

API analytics uses scheduled jobs to collect and clean up analytics data.

The instance tracks all web service transactions for APIs on the inclusion list and maintains a
daily history, aggregated by resource and HTTP action combination. Requester information is
aggregated per requester, resource, and HTTP action combination and tracked up to the daily limit
defined by the property com.glide.api.stats.daily_ limit.  
Refer to the following table to determine which requests are logged.{#c_APIAnalyticsCollectClean__table_mdt_fkr_2x__entry__5}

| API name | Example resource | Response code | Description | Logged |
|-|-|-|-|-|
| now/table | /api/now/table/incident | Any except 401 | Valid resource and table | Yes |
| now/table | /api/now/table/invalidResource | 400 | Valid resource but an invalid table | Yes |
| now/table | /api/now/table/incident | 403 | Requesting user has insufficient privileges | Yes |
| now/table | /api/now/table/incident | 401 | Requesting user is not authenticated | No |
| myApp/myScriptedApi | myApp/myScriptedApi/myResource | Any except 401 | Valid resource | Yes |
| myApp/invalidApiName | * myApp/invalidApiName * myApp/invalidApiName/myResource {#c_APIAnalyticsCollectClean__ul_n1z_pfg_fx} | 400 | Invalid API, even with a matching inclusion list entry | No |
[Table 1. Logged requests]

{#c_APIAnalyticsCollectClean__table_mdt_fkr_2x}

On the 2nd of each month, the API Monthly Stats scheduled job calculates the monthly total for
each resource and HTTP action combination. Each day the API Monthly Requestor Stats scheduled job
calculates the monthly total for each resource, requester, and HTTP action combination based on
daily scores older than 2 days.

Daily statistics are maintained for 33 days. Monthly totals are maintained for 13 months. Table
cleaners for the sys_api_stats, sys_api_stats_requestor, and sys_api_stats_requestor_monthly
tables remove analytics records older than these limits.

## REST \& SOAP API analytics naming {#ariaid-title2}

The API Name used when tracking API analytics is determined by
the type of API being described, such as a REST API or a Scripted SOAP service.
{#r_APIAnalyticsNaming__table_dnf_n3b_55__entry__2}{#r_APIAnalyticsNaming__p_ibd_cg4_rw}

| API type | Description |
|-|-|
| REST | The API namespace and the first part of the URI following the namespace is used as the API name. For example, for the Table API endpoints api/now/table/incident and api/now/table/problem, the namespace and ID are now/table. |
| Direct SOAP (table does not extend Import Set Row table) | If the direct SOAP request accesses a table, Direct SOAP is used as the API name. |
| SOAP import (table extends Import Set Row table) | Import Set SOAP is used as the API name. |
| Scripted SOAP Services | The SOAP request endpoint page is used as the API name, such as my_service.do. |
[ ]

{#r_APIAnalyticsNaming__table_dnf_n3b_55}

