---
schema_version: "1"
id: 02f529bb744a3cdf4d90196e56dae661e21846f64309c8c29ff51803be09cd5c
title: Metrics
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/references/generated-api-specs/metrics.md
canonical_url: https://developer.salesforce.com/docs/commerce/commerce-api/references/metrics
source_site: developer.salesforce.com
content_type: documentation
content_hash: 137e8a01da1044e1a9ac51911e165a6e402d8ff4b40da356507146f099204884
products:
  - B2C Commerce API
  - Salesforce APIs
---
Metrics

# Metrics

[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/metrics/metrics-oas-v1-public.yaml)

## API Overview

The Metrics API provides programmatic access to time-series operational metrics for Salesforce Commerce Cloud organizations. It exposes the same metrics available in the LogCenter UI, organized by functional category, so that data can be ingested into third-party BI and monitoring tools (such as Tableau or Grafana) and into agentic-observability workflows.

This is an Admin API: it is intended for operators, SRE teams, and machine clients (BI tools, monitoring agents) acting on behalf of a customer organization, not for storefront shoppers.

> **Note:** The Metrics API is currently in a closed beta. To request access, please contact your account manager.

### Endpoints

The API exposes nine pre-aggregated metric categories, each accessible through its own typed path:

*   **`/metrics/overall`** — Overall application performance metrics
*   **`/metrics/sales`** — Sales and commerce metrics
*   **`/metrics/ecdn`** — eCDN performance and caching metrics
*   **`/metrics/third-party`** — Third-party service integration metrics
*   **`/metrics/scapi`** — SCAPI request and performance metrics
*   **`/metrics/scapi-hooks`** — SCAPI hooks execution metrics
*   **`/metrics/mrt`** — Managed Runtime metrics
*   **`/metrics/controller`** — Controller and pipeline metrics
*   **`/metrics/ocapi`** — OCAPI request and performance metrics

Each request returns a single time-series document for the requested category, organization, and time window.

### Key Features

*   **Time-series data retrieval** with Unix epoch time-range parameters (in seconds)
*   **Multiple metric categories** covering all aspects of Commerce Cloud performance
*   **Organization-scoped access** with proper authentication and authorization
*   **Filtering capabilities** for specific APIs, services, and OCAPI sub-categories
*   **Standardized response format** with comprehensive metadata

### Authentication & Authorization

This API uses standard SCAPI authentication mechanisms:

*   **OAuth 2.0** (`AmOAuth2`) with the SCAPI gateway
*   **Organization-scoped access** — callers can only retrieve metrics for organizations they are authorized to access

Required OAuth scope:

*   `sfcc.metrics` — read access to metrics

### Time-Range Constraints

Two backend-enforced constraints bound every request:

*   **Maximum lookback:** `from` must not resolve to a time more than 30 days ago. This matches the configured retention of the underlying metrics store; older data is not retained.
*   **Maximum window:** `to - from` must not exceed 1 day. Requests that exceed this return `400 Bad Request`.

### Use Cases

#### Overall application monitoring

Monitor total platform requests, sessions, and response times.

```
GET /organizations/{orgId}/metrics/overall?from=1672531200&to=1672534800
```

#### Sales performance tracking

Track order creation and basket activity.

```
GET /organizations/{orgId}/metrics/sales?from=1672488000&to=1672531200
```

#### eCDN performance analysis

Monitor CDN performance, cache hit rates, and bandwidth usage.

```
GET /organizations/{orgId}/metrics/ecdn?from=1672509600&to=1672531200
```

#### SCAPI performance monitoring

Monitor SCAPI request latency and response counts, optionally filtered by API family and / or API name.

```
GET /organizations/{orgId}/metrics/scapi?from=1672527600&to=1672531200&apiFamily=shopper&apiName=products
```

#### Third-party service monitoring

Track third-party service call performance and error rates, optionally filtered to a single named service.

```
GET /organizations/{orgId}/metrics/third-party?from=1672488000&to=1672531200&thirdPartyServiceId=apple-pay-gateway.apple.com
```

#### SCAPI Hooks performance monitoring

Track SCAPI hook execution time and error rates.

```
GET /organizations/{orgId}/metrics/scapi-hooks?from=1672527600&to=1672531200
```

#### Managed Runtime monitoring

Monitor MRT request volume, cache hit rates, error rates, and Lambda invocations.

```
GET /organizations/{orgId}/metrics/mrt?from=1672488000&to=1672531200
```

#### Controller performance monitoring

Track controller invocation volume and processing duration.

```
GET /organizations/{orgId}/metrics/controller?from=1672527600&to=1672531200
```

#### OCAPI performance monitoring

Monitor OCAPI metrics, optionally filtered by OCAPI category and / or OCAPI API endpoint.

```
GET /organizations/{orgId}/metrics/ocapi?from=1672527600&to=1672531200&ocapiCategory=shop&ocapiApi=baskets
```

### Metric Categories

#### Overall Application

*   Total Platform Requests — Overall request volume
*   Storefront Requests — Customer-facing request volume
*   Sessions — Active user sessions
*   Response Time — Average response latency
*   Emails Sent — Email delivery volume
*   System Workload — Overall system utilization

#### Sales

*   Orders — Order creation rate
*   Basket Creations — Shopping basket creation rate
*   Basket Updates — Basket modification rate

#### eCDN

*   Success and Errors — Request success / failure rates
*   Cache Hit Percentage — CDN cache effectiveness
*   Total Requests — Overall CDN request volume
*   Total Bandwidth — Data-transfer volume
*   Total Pageviews — Page view metrics
*   Unique Visitors — Unique visitor tracking

#### Third-Party Services

*   Call Counts — API call volume to external services
*   Call Duration p95 — 95th-percentile response times
*   Remote Exceptions — Error rates from external services

#### SCAPI

*   Request Latency — API response times
*   Response Count — SCAPI response volume by API family and HTTP status class (2xx/3xx/4xx/5xx)
*   Cache Hit Statistics — API-level caching metrics

#### SCAPI Hooks

*   Hook Execution Times — Hook processing duration
*   Hook Errors — Hook execution error rates

#### Managed Runtime

*   Request Count — MRT request volume
*   Cache Hit Rates — MRT caching performance
*   Error Rates — MRT error percentages
*   Lambda Invocations — Serverless function executions
*   Request Times — MRT processing duration

#### Controller

*   Total Calls — Controller invocation count
*   Average Duration — Controller processing time

#### OCAPI

*   Total Calls — OCAPI request volume
*   Average Duration — OCAPI response times
*   Total Errors — OCAPI error counts

**Version:** 1.0.2

## Servers

*   `https://{shortCode}.api.commercecloud.salesforce.com/observability/metrics/v1`
    *   `shortCode (default shortCode) Tenant-specific short code`

## Security

*   `AmOAuth2` (oauth2) AccountManager OAuth 2.0 bearer token Authentication.
    *   OAuth flow clientCredentials (tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token)
    *   Scope sfcc.metrics: metrics READONLY

## Operations

### GET Get Overall Application metrics

`GET /organizations/{organizationId}/metrics/overall`

Operation ID: `getOverallMetrics`. Tags: Overall Application. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all overall application performance metrics including total platform requests, storefront requests, sessions, response time, emails sent, and system workload.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved overall application metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: OverallMetricsResponseExample_ Overall Application metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "totalCalls",
          "title": "Total Platform Requests",
          "description": "Total number of platform requests per minute.",
          "unit": "requests/min",
          "dataSeries": [
            {
              "id": "realm1.totalCalls",
              "name": "realm1 Total Calls",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 1250.5
                },
                {
                  "timestamp": 1640995260,
                  "value": 1275.2
                },
                {
                  "timestamp": 1640995320,
                  "value": 1201.8
                }
              ]
            }
          ]
        },
        {
          "metricId": "sessions",
          "title": "Sessions",
          "description": "Number of active sessions across all sites per minute.",
          "unit": "sessions/min",
          "dataSeries": [
            {
              "id": "realm1.sessions",
              "name": "realm1 Sessions",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 45.2
                },
                {
                  "timestamp": 1640995260,
                  "value": 47.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 44.8
                }
              ]
            }
          ]
        },
        {
          "metricId": "responseTime",
          "title": "Response Time",
          "description": "Average response time across all requests.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.responseTime",
              "name": "realm1 Response Time",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 156.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 148.7
                },
                {
                  "timestamp": 1640995320,
                  "value": 162.1
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example: InvalidTimeParameterExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Invalid time parameter 'from'. Must be a Unix epoch timestamp in seconds (e.g., 1672531200).",
      "parameter": "from"
    }
    ```
    
    _Example: InvalidTimeRangeExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Invalid time range: 'from' (1672534800) must be earlier than 'to' (1672531200).",
      "fromValue": 1672534800,
      "toValue": 1672531200
    }
    ```
    
    _Example: InvalidTimeParameterErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-time-parameter",
      "detail": "Invalid time parameter 'from'. Must be a Unix epoch timestamp in seconds (e.g., 1672531200).",
      "title": "Invalid Time Parameter"
    }
    ```
    
    _Example: InvalidTimeRangeErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-time-range",
      "detail": "Invalid time range: 'from' (1672534800) must be earlier than 'to' (1672531200).",
      "title": "Invalid Time Range"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example: CategoryNotFoundExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found",
      "title": "Not Found",
      "detail": "Metrics category 'unknown-category' not found or not available for organization 'f_ecom_zzxy_prd'.",
      "category": "unknown-category",
      "organizationId": "f_ecom_zzxy_prd"
    }
    ```
    
    _Example: CategoryNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/category-not-found",
      "detail": "Metrics category 'unknown-category' not found or not available for organization 'f_ecom_zzxy_prd'.",
      "title": "Category Not Found"
    }
    ```
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example: MetricsUnavailableExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/service-unavailable",
      "title": "Service Unavailable",
      "detail": "Metrics data is temporarily unavailable for organization 'f_ecom_zzxy_prd'. Please try again later.",
      "organizationId": "f_ecom_zzxy_prd"
    }
    ```
    
    _Example: MetricsNotAvailableErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/metrics-not-available",
      "detail": "Metrics data is temporarily unavailable for organization 'f_ecom_zzxy_prd'. Please try again later.",
      "title": "Metrics Not Available"
    }
    ```
    

### GET Get Sales metrics

`GET /organizations/{organizationId}/metrics/sales`

Operation ID: `getSalesMetrics`. Tags: Sales. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all sales metrics including orders, basket creations, and basket updates.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved sales metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: SalesMetricsResponseExample_ Sales metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "orders",
          "title": "Orders",
          "description": "Number of orders created across all sites per minute.",
          "unit": "orders/min",
          "dataSeries": [
            {
              "id": "realm1.orders",
              "name": "realm1 Orders",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 25.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 27.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 23.8
                }
              ]
            }
          ]
        },
        {
          "metricId": "basketCreations",
          "title": "Basket Creations",
          "description": "Number of baskets created across all sites per minute.",
          "unit": "baskets/min",
          "dataSeries": [
            {
              "id": "realm1.basketCreations",
              "name": "realm1 Basket Creations",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 85.2
                },
                {
                  "timestamp": 1640995260,
                  "value": 89.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 82.5
                }
              ]
            }
          ]
        },
        {
          "metricId": "basketUpdates",
          "title": "Basket Updates",
          "description": "Number of basket updates across all sites per minute.",
          "unit": "updates/min",
          "dataSeries": [
            {
              "id": "realm1.basketUpdates",
              "name": "realm1 Basket Updates",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 142.7
                },
                {
                  "timestamp": 1640995260,
                  "value": 138.9
                },
                {
                  "timestamp": 1640995320,
                  "value": 156.3
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get eCDN metrics

`GET /organizations/{organizationId}/metrics/ecdn`

Operation ID: `getEcdnMetrics`. Tags: eCDN. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all eCDN metrics including success and errors, cache hit percentage, total requests, total bandwidth, total pageviews, and unique visitors.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved eCDN metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: EcdnMetricsResponseExample_ eCDN metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "successAndError",
          "title": "Success and Errors",
          "description": "Total success and error requests per minute.",
          "unit": "requests/min",
          "dataSeries": [
            {
              "id": "realm1.successAndError",
              "name": "realm1 Success and Errors",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 8945.2
                },
                {
                  "timestamp": 1640995260,
                  "value": 9103.7
                },
                {
                  "timestamp": 1640995320,
                  "value": 8876.1
                }
              ]
            }
          ]
        },
        {
          "metricId": "cacheHits",
          "title": "Cache Hit Percentage",
          "description": "Percentage of requests served from cache.",
          "unit": "percentage",
          "dataSeries": [
            {
              "id": "realm1.cacheHits",
              "name": "realm1 Cache Hit Percentage",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 87.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 89.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 85.7
                }
              ]
            }
          ]
        },
        {
          "metricId": "totalBandwidth",
          "title": "Total Bandwidth",
          "description": "Total bandwidth usage per minute.",
          "unit": "bytes/min",
          "dataSeries": [
            {
              "id": "realm1.totalBandwidth",
              "name": "realm1 Total Bandwidth",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 2048576000
                },
                {
                  "timestamp": 1640995260,
                  "value": 2156789123
                },
                {
                  "timestamp": 1640995320,
                  "value": 1987654321
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get Third Party Service metrics

`GET /organizations/{organizationId}/metrics/third-party`

Operation ID: `getThirdPartyMetrics`. Tags: Third Party Services. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all third party service metrics including call counts, call duration percentiles, and remote exceptions.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.
*   `thirdPartyServiceId` (query, ThirdPartyServiceId) Filter by a specific third party service identifier (typically a hostname, e.g. `apple-pay-gateway.apple.com`). The list of services is customer-configured; omit this parameter to get one data series per (realm, third party service).

#### Responses

*   **200** Successfully retrieved third party service metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: ThirdPartyMetricsResponseExample_ Third Party Services metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "callCounts",
          "title": "Call Counts",
          "description": "Number of calls to third party services per minute.",
          "unit": "calls/min",
          "dataSeries": [
            {
              "id": "realm1.apple-pay-gateway.apple.com",
              "name": "realm1 apple-pay-gateway.apple.com Call Counts",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 156
                },
                {
                  "timestamp": 1640995260,
                  "value": 163
                },
                {
                  "timestamp": 1640995320,
                  "value": 149
                }
              ]
            }
          ]
        },
        {
          "metricId": "callDurationP95",
          "title": "Call Duration P95",
          "description": "95th percentile of call duration to third party services.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.apple-pay-gateway.apple.com",
              "name": "realm1 apple-pay-gateway.apple.com Call Duration P95",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 425.7
                },
                {
                  "timestamp": 1640995260,
                  "value": 398.2
                },
                {
                  "timestamp": 1640995320,
                  "value": 467.3
                }
              ]
            }
          ]
        },
        {
          "metricId": "remoteExceptions",
          "title": "Remote Exceptions",
          "description": "Number of exceptions from third party services per minute.",
          "unit": "exceptions/min",
          "dataSeries": [
            {
              "id": "realm1.apple-pay-gateway.apple.com",
              "name": "realm1 apple-pay-gateway.apple.com Remote Exceptions",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 2
                },
                {
                  "timestamp": 1640995260,
                  "value": 1
                },
                {
                  "timestamp": 1640995320,
                  "value": 3
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters or third party service filter
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse | InvalidThirdPartyServiceErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`, `InvalidThirdPartyServiceErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example: InvalidThirdPartyServiceExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Third party service 'unknown-service.example.com' not found for organization 'f_ecom_zzxy_prd'.",
      "thirdPartyServiceId": "unknown-service.example.com",
      "organizationId": "f_ecom_zzxy_prd"
    }
    ```
    
    _Example: InvalidThirdPartyServiceErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-third-party-service",
      "detail": "Third party service 'apple-pay-gateway.apple.com' not found for organization 'f_ecom_zzxy_prd'.",
      "title": "Invalid Third Party Service"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get SCAPI metrics

`GET /organizations/{organizationId}/metrics/scapi`

Operation ID: `getScapiMetrics`. Tags: SCAPI. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all SCAPI metrics including request latency, response counts, and cache hit statistics.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.
*   `apiFamily` (query, string) Filter by SCAPI family name  
    Minimum length: 1. Maximum length: 100. Example: `shopper`.
*   `apiName` (query, string) Filter by specific SCAPI name  
    Minimum length: 1. Maximum length: 100. Example: `products`.

#### Responses

*   **200** Successfully retrieved SCAPI metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: ScapiMetricsResponseExample_ SCAPI metrics response with filters
    
    ```
    {
      "data": [
        {
          "metricId": "requestLatency",
          "title": "Request Latency",
          "description": "Average request latency for SCAPI calls.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.shopper.products.requestLatency",
              "name": "realm1 Shopper Products Request Latency",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 245.7
                },
                {
                  "timestamp": 1640995260,
                  "value": 231.2
                },
                {
                  "timestamp": 1640995320,
                  "value": 267.8
                }
              ]
            }
          ]
        },
        {
          "metricId": "responseCount",
          "title": "Response Count",
          "description": "Number of SCAPI responses per minute.",
          "unit": "responses/min",
          "dataSeries": [
            {
              "id": "realm1.shopper.products.responseCount",
              "name": "realm1 Shopper Products Response Count",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 1456
                },
                {
                  "timestamp": 1640995260,
                  "value": 1523
                },
                {
                  "timestamp": 1640995320,
                  "value": 1389
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters or SCAPI filter value
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse | InvalidApiFilterErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`, `InvalidApiFilterErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example: InvalidApiFamilyExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Invalid value 'invalid-family' for filter 'apiFamily'.",
      "filterName": "apiFamily",
      "filterValue": "invalid-family"
    }
    ```
    
    _Example: InvalidApiNameExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Invalid value 'unknown-api' for filter 'apiName'.",
      "filterName": "apiName",
      "filterValue": "unknown-api"
    }
    ```
    
    _Example: InvalidApiFilterErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-api-filter",
      "detail": "Invalid value 'invalid-family' for filter 'apiFamily'.",
      "title": "Invalid Api Filter"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get SCAPI Hooks metrics

`GET /organizations/{organizationId}/metrics/scapi-hooks`

Operation ID: `getScapiHooksMetrics`. Tags: SCAPI Hooks. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all SCAPI hooks metrics including hook execution times and hook errors.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved SCAPI hooks metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: ScapiHooksMetricsResponseExample_ SCAPI Hooks metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "hookExecutionTimes",
          "title": "Hook Execution Times",
          "description": "Average execution time for SCAPI hooks.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.hookExecutionTimes",
              "name": "realm1 Hook Execution Times",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 45.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 52.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 38.7
                }
              ]
            }
          ]
        },
        {
          "metricId": "hookErrors",
          "title": "Hook Errors",
          "description": "Number of hook execution errors per minute.",
          "unit": "errors/min",
          "dataSeries": [
            {
              "id": "realm1.hookErrors",
              "name": "realm1 Hook Errors",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 0.5
                },
                {
                  "timestamp": 1640995260,
                  "value": 1
                },
                {
                  "timestamp": 1640995320,
                  "value": 0
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get Managed Runtime metrics

`GET /organizations/{organizationId}/metrics/mrt`

Operation ID: `getMrtMetrics`. Tags: Managed Runtime. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all Managed Runtime metrics including request counts, cache hit rates, error rates, Lambda invocations, and request times.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved Managed Runtime metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: MrtMetricsResponseExample_ Managed Runtime metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "requestCount",
          "title": "Request Count",
          "description": "Number of MRT requests per minute.",
          "unit": "requests/min",
          "dataSeries": [
            {
              "id": "realm1.requestCount",
              "name": "realm1 Request Count",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 789.2
                },
                {
                  "timestamp": 1640995260,
                  "value": 823.4
                },
                {
                  "timestamp": 1640995320,
                  "value": 756.1
                }
              ]
            }
          ]
        },
        {
          "metricId": "cacheHitRates",
          "title": "Cache Hit Rates",
          "description": "Percentage of requests served from MRT cache.",
          "unit": "percentage",
          "dataSeries": [
            {
              "id": "realm1.cacheHitRates",
              "name": "realm1 Cache Hit Rates",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 92.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 94.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 89.7
                }
              ]
            }
          ]
        },
        {
          "metricId": "errorRates",
          "title": "Error Rates",
          "description": "Percentage of MRT requests that resulted in errors.",
          "unit": "percentage",
          "dataSeries": [
            {
              "id": "realm1.errorRates",
              "name": "realm1 Error Rates",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 0.8
                },
                {
                  "timestamp": 1640995260,
                  "value": 1.2
                },
                {
                  "timestamp": 1640995320,
                  "value": 0.5
                }
              ]
            }
          ]
        },
        {
          "metricId": "lambdaInvocations",
          "title": "Lambda Invocations",
          "description": "Number of Lambda function invocations per minute.",
          "unit": "invocations/min",
          "dataSeries": [
            {
              "id": "realm1.lambdaInvocations",
              "name": "realm1 Lambda Invocations",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 234
                },
                {
                  "timestamp": 1640995260,
                  "value": 267
                },
                {
                  "timestamp": 1640995320,
                  "value": 201
                }
              ]
            }
          ]
        },
        {
          "metricId": "requestTimes",
          "title": "Request Times",
          "description": "Average request processing time in MRT.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.requestTimes",
              "name": "realm1 Request Times",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 123.4
                },
                {
                  "timestamp": 1640995260,
                  "value": 118.7
                },
                {
                  "timestamp": 1640995320,
                  "value": 134.2
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get Controller metrics

`GET /organizations/{organizationId}/metrics/controller`

Operation ID: `getControllerMetrics`. Tags: Controller. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all controller/pipeline metrics including total calls and average duration.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.

#### Responses

*   **200** Successfully retrieved controller metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: ControllerMetricsResponseExample_ Controller metrics response
    
    ```
    {
      "data": [
        {
          "metricId": "totalCalls",
          "title": "Total Calls",
          "description": "Number of controller invocations per minute.",
          "unit": "calls/min",
          "dataSeries": [
            {
              "id": "realm1.totalCalls",
              "name": "realm1 Total Calls",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 456.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 489.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 423.7
                }
              ]
            }
          ]
        },
        {
          "metricId": "averageDuration",
          "title": "Average Duration",
          "description": "Average controller processing time.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.averageDuration",
              "name": "realm1 Average Duration",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 67.8
                },
                {
                  "timestamp": 1640995260,
                  "value": 72.3
                },
                {
                  "timestamp": 1640995320,
                  "value": 61.4
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

### GET Get OCAPI metrics

`GET /organizations/{organizationId}/metrics/ocapi`

Operation ID: `getOcapiMetrics`. Tags: OCAPI. Security: AmOAuth2 (sfcc.metrics).

Retrieve time series data for all Open Commerce API metrics including total calls, average duration, and total errors.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `from` (query, integer (int64))
    
    Start time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to one hour before `to`.
    
    Constraints:
    
    *   `from` must not resolve to a time more than 30 days before the request (matches the configured retention of the underlying metrics store).
    *   `to` minus `from` must not exceed 1 day.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672531200`.
*   `to` (query, integer (int64))
    
    End time for the query window, expressed as a Unix epoch timestamp in seconds.
    
    If not specified, defaults to the current time (now).
    
    Constraints:
    
    *   `to` minus `from` must not exceed 1 day.
    *   `from` must not resolve to a time more than 30 days before the request.
    
    Requests violating either constraint return `400 Bad Request`.
    
      
    Minimum: 1. Example: `1672534800`.
*   `ocapiCategory` (query, string) Filter by Open Commerce API category. Common values include `shop`, `data` and `mercury`. Queries with values that don't match any series return 200 with empty data.  
    Minimum length: 1. Maximum length: 100. Example: `shop`.
*   `ocapiApi` (query, string) Filter by specific Open Commerce API endpoint (e.g. `baskets`).  
    Minimum length: 1. Maximum length: 100. Example: `baskets`.

#### Responses

*   **200** Successfully retrieved OCAPI metrics for the requested time window
    
    Media type: `application/json`. Schema: `MetricsDataResponse`.
    
    _Example: OcapiMetricsResponseExample_ OCAPI metrics response with filters
    
    ```
    {
      "data": [
        {
          "metricId": "totalCalls",
          "title": "Total Calls",
          "description": "Number of OCAPI calls per minute.",
          "unit": "calls/min",
          "dataSeries": [
            {
              "id": "realm1.shop.baskets.totalCalls",
              "name": "realm1 Shop Baskets Total Calls",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 234.5
                },
                {
                  "timestamp": 1640995260,
                  "value": 251.2
                },
                {
                  "timestamp": 1640995320,
                  "value": 218.9
                }
              ]
            }
          ]
        },
        {
          "metricId": "averageDuration",
          "title": "Average Duration",
          "description": "Average OCAPI response time.",
          "unit": "ms",
          "dataSeries": [
            {
              "id": "realm1.shop.baskets.averageDuration",
              "name": "realm1 Shop Baskets Average Duration",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 89.3
                },
                {
                  "timestamp": 1640995260,
                  "value": 94.7
                },
                {
                  "timestamp": 1640995320,
                  "value": 82.1
                }
              ]
            }
          ]
        },
        {
          "metricId": "totalErrors",
          "title": "Total Errors",
          "description": "Number of OCAPI errors per minute.",
          "unit": "errors/min",
          "dataSeries": [
            {
              "id": "realm1.shop.baskets.totalErrors",
              "name": "realm1 Shop Baskets Total Errors",
              "data": [
                {
                  "timestamp": 1640995200,
                  "value": 3.2
                },
                {
                  "timestamp": 1640995260,
                  "value": 4.1
                },
                {
                  "timestamp": 1640995320,
                  "value": 2.7
                }
              ]
            }
          ]
        }
      ]
    }
    ```
    
*   **400** Bad request — invalid time parameters or OCAPI filter value
    
    Media type: `application/problem+json`. Schema: `InvalidTimeParameterErrorResponse | InvalidTimeRangeErrorResponse | InvalidApiFilterErrorResponse`.
    
    One of: `InvalidTimeParameterErrorResponse`, `InvalidTimeRangeErrorResponse`, `InvalidApiFilterErrorResponse`.
    
    _Example InvalidTimeParameterExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeParameterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidTimeRangeErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 400 response._
    
    _Example InvalidApiFilterErrorResponseExample: same as GET /organizations/{organizationId}/metrics/scapi 400 response._
    
    _Example: InvalidOcapiApiExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "title": "Bad Request",
      "detail": "Invalid value 'unknown-api' for filter 'ocapiApi'.",
      "filterName": "ocapiApi",
      "filterValue": "unknown-api"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Metrics category not available for the organization
    
    Media type: `application/problem+json`. Schema: `CategoryNotFoundErrorResponse`.
    
    _Example CategoryNotFoundExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
    _Example CategoryNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 404 response._
    
*   **503** Metrics data temporarily unavailable
    
    Media type: `application/problem+json`. Schema: `MetricsNotAvailableErrorResponse`.
    
    _Example MetricsUnavailableExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    
    _Example MetricsNotAvailableErrorResponseExample: same as GET /organizations/{organizationId}/metrics/overall 503 response._
    

## Schemas

### OrganizationId

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Type: `string`.

Pattern: ^f\_ecom\_\[a-z\]{4}\_(prd|stg|dev|s\[0-9\]{2}|\[0-9\]{3})$. Example: `f_ecom_zzxy_prd`.

### MetricsDataResponse

Response containing metrics data for a requested category

*   `data` (_array of Metric_, required) Array of metrics for the requested category

_Example_

```
{
  "data": [
    {
      "metricId": "totalCalls",
      "title": "Total Platform Requests",
      "description": "Total number of platform requests per minute.",
      "unit": "requests/min",
      "dataSeries": [
        {
          "id": "realm1.totalCalls",
          "name": "realm1 Total Calls",
          "data": [
            {
              "timestamp": 1640995200,
              "value": 1250.5
            }
          ]
        }
      ]
    }
  ]
}
```

### InvalidTimeParameterErrorResponse

Returned when an invalid time parameter format is provided

Includes all fields of `ErrorResponse`.

*   `parameter` (_string_, required) The invalid parameter name that caused the error  
    Maximum length: 100. Example: `from`.

### InvalidTimeRangeErrorResponse

Returned when the from parameter is later than the to parameter

Includes all fields of `ErrorResponse`.

*   `fromValue` (_integer (int64)_, required) The from parameter value that caused the error  
    Example: `1672534800`.
*   `toValue` (_integer (int64)_, required) The to parameter value that caused the error  
    Example: `1672531200`.

### ErrorResponse

*   `title` (_string_, required) A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization  
    Maximum length: 256. Example: `You do not have enough credit`.
*   `type` (_string_, required) A URI reference \[RFC3986\] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML \[W3C.REC-html5-20141028\]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `NotEnoughMoney`.
*   `detail` (_string_, required) A human-readable explanation specific to this occurrence of the problem.  
    Example: `Your current balance is 30, but that costs 50`.
*   `instance` (_string_) A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `/account/12345/msgs/abc`.

### CategoryNotFoundErrorResponse

Returned when a metrics category is not found or not available

Includes all fields of `ErrorResponse`.

*   `category` (_string_) The requested category that was not found  
    Maximum length: 50. Example: `unknown-category`.
*   `organizationId` (_OrganizationId_)

### MetricsNotAvailableErrorResponse

Returned when metrics data is temporarily unavailable

Includes all fields of `ErrorResponse`.

*   `organizationId` (_OrganizationId_)

### ThirdPartyServiceId

Third party service identifier, typically a hostname (e.g. `apple-pay-gateway.apple.com`). The list of services is customer-configured.

Type: `string`.

Minimum length: 1. Maximum length: 255. Example: `apple-pay-gateway.apple.com`.

### InvalidThirdPartyServiceErrorResponse

Returned when an invalid third party service filter is provided

Includes all fields of `ErrorResponse`.

*   `thirdPartyServiceId` (_ThirdPartyServiceId_, required)
*   `organizationId` (_OrganizationId_, required)

### InvalidApiFilterErrorResponse

Returned when an invalid SCAPI or OCAPI filter value is provided (apiFamily, apiName, ocapiApi)

Includes all fields of `ErrorResponse`.

*   `filterName` (_string_, required) The filter parameter name that received an invalid value  
    Maximum length: 100. Example: `apiFamily`.
*   `filterValue` (_string_, required) The invalid value provided for the filter  
    Maximum length: 100. Example: `invalid-family`.

### Metric

A single metric with its metadata and time series data

*   `metricId` (_MetricId_, required)
*   `title` (_string_, required) Human-readable title of the metric  
    Minimum length: 1. Maximum length: 200. Example: `Total Platform Requests`.
*   `description` (_string_, required) Description of what this metric measures  
    Minimum length: 1. Maximum length: 500. Example: `Total number of platform requests per minute.`.
*   `unit` (_string_, nullable) Unit of measurement for the metric values. Optional: omitted (or empty) when the unit is implied by the metric title (e.g. "Number of Calls", "Storefront Requests" — count metrics).  
    Minimum length: 0. Maximum length: 50. Example: `requests/min`.
*   `dataSeries` (_array of DataSeries_, required) Data series for this metric across different realms/filters

### MetricId

Unique identifier for a metric type

Type: `string`.

Minimum length: 1. Maximum length: 100. Pattern: ^\[a-zA-Z0-9\_-\]+$. Example: `totalCalls`.

### DataSeries

Time series data for a specific realm/filter combination

*   `id` (_DataSeriesId_, required)
*   `name` (_string_, required) Human-readable name of the data series  
    Minimum length: 1. Maximum length: 200. Example: `realm1 Total Calls`.
*   `data` (_array of DataPoint_, required) Array of time series data points

### DataSeriesId

Unique identifier for a data series within a metric

Type: `string`.

Minimum length: 1. Maximum length: 200. Example: `realm1.totalCalls`.

### DataPoint

A single time series data point

*   `timestamp` (_integer_, required) Unix timestamp of the data point  
    Minimum: 0. Example: `1640995200`.
*   `value` (_number_, required, nullable) Metric value at the timestamp  
    Example: `1250.5`.