---
schema_version: "1"
id: 60c66333a07708f888f7cc86379d33564e2ec23d38e0d0b2c37272b7b55bdae7
title: Lightning Usage by FlexiPage
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-lightning-usagebyflexipagemetrics.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-lightning-usagebyflexipagemetrics.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 971a210e6cfe84f6c2f74700357856b5cf703cf518f3c320d04c3481cdbdaee1
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Lightning Usage by FlexiPage

Returns details about the custom pages viewed most frequently in Lightning Experience. This resource is available in REST API version 44.0 and later.

Use this object with the following APIs:

-   Platform
-   Metadata API
-   Tooling API

## Syntax

**URI:** `/services/data/vXX.X/sobjects/LightningUsageByFlexiPageMetrics`

**Formats:** JSON, XML

**HTTP methods:** GET

**Request parameters**

|Parameter|Description|
|---------|-----------|
|`FlexiPageNameOrId`|Namespace and file name, or Page ID of `FlexiPage` files.|
|`FlexiPageType`|The `FlexiPage` type. For example, record details are displayed using `RecordPage`" type.|
|`MetricsDate`|The date the metric was recorded.|
|`RecordCountEPT`|Number of records for a `FlexiPage` type, where the valid EPT was recorded.|
|`SumEPT`|Sum of the EPT values for a record|
|`TotalCount`|Total records for a type.|

## Example

**Example Request**

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/LightningUsageByFlexiPageMetrics -H "Authorization: Bearer token"
```

**Example Request Body**

```nolang
SELECT FlexiPageNameOrId FlexiPageNameOrId, SUM(TotalCount) Total FROM LightningUsageByFlexiPageMetrics WHERE MetricsDate = Last_N_DAYS:7 AND (NOT FlexiPageNameOrId = 'unknown unknown') AND (NOT FlexiPageNameOrId = 'unknown | unknown') GROUP BY FlexiPageNameOrId ORDER BY SUM(TotalCount) Desc Limit 10
```

