---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/metrics](../index.md) / getScapiMetrics

# Function: getScapiMetrics()

> **getScapiMetrics**(`client`, `tenantId`, `options?`): `Promise`\<\{ \}\>

Defined in: [packages/b2c-tooling-sdk/src/operations/metrics/index.ts:555](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/metrics/index.ts#L555)

Retrieves SCAPI request metrics for an organization.

## Parameters

### client

[`MetricsClient`](../../../clients/type-aliases/MetricsClient.md)

Metrics API client from createMetricsClient

### tenantId

`string`

Tenant ID (with or without the `f_ecom_` prefix)

### options?

[`ScapiMetricsOptions`](../interfaces/ScapiMetricsOptions.md)

Optional time window and `apiFamily`/`apiName` filters

## Returns

`Promise`\<\{ \}\>

The metrics data response

## Throws

Error if the request fails
