---
title: "Fetch entity and global success rates"
method: POST
path: "/success_rate.SuccessRateCalculator/FetchEntityAndGlobalSuccessRate"
tags: ["Success Rate"]
---

# Fetch entity and global success rates

`POST /success_rate.SuccessRateCalculator/FetchEntityAndGlobalSuccessRate`

Calculates success rates for both entity-specific and global metrics

## Headers

- `x-tenant-id` string, required
- `x-profile-id` string, required
- `x-api-key` string, required

## Request body

- CalGlobalSuccessRateRequest
  - `entity_id` string
  - `entity_params` string
  - `entity_labels` string[]
  - `global_labels` string[]
  - `config` CalGlobalSuccessRateConfig
    - `entity_min_aggregates_size` integer
    - `entity_default_success_rate` number, double

## Response `200`

Success rates calculated successfully

- CalGlobalSuccessRateResponse
  - `entity_scores_with_labels` LabelWithScore[] — Entity-specific labels with their calculated success rates
    - LabelWithScoreList[]
      - `score` number, double, required — Calculated success rate score
      - `label` string, required — Label identifier
  - `global_scores_with_labels` LabelWithScore[] — Global labels with their calculated success rates
    - LabelWithScoreList[]
      - `score` number, double, required — Calculated success rate score
      - `label` string, required — Label identifier

## Other responses

- `400` — Invalid request parameters
- `500` — Internal server error

---

[API](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0.md) · [All operations](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperswitch/dynamic-routing-openapi-3-0/revisions/8fbf69ab2597/schema)
