Skip to main content
POST
/
analytics
/
v2
/
data
/
ratingdistribution
Rating Distribution
curl --request POST \
  --url https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": "CCR",
  "rating_scale": "CB21",
  "effective_date": 20250930,
  "lookback_period": 12,
  "lookback_unit": "months",
  "scope": {
    "filters": [
      {
        "key": "CBCountryOfRisk",
        "operator": "==",
        "values": "United States"
      }
    ]
  },
  "facet_column": "CBSector"
}
'
{
  "EffectiveDateId": [
    20250831,
    20250731
  ],
  "a": [
    0.18,
    0.16
  ],
  "a-": [
    0.27,
    0.29
  ],
  "bbb+": [
    0.23,
    0.22
  ],
  "bbb": [
    0.19,
    0.2
  ],
  "bbb-": [
    0.13,
    0.13
  ]
}

Authorizations

Authorization
string
header
required

JWT bearer token.

Body

application/json
scope
object
required

Defines the input universe. Use portfolio, filters, or both.

metric
enum<string>
default:CCR

Metric to compute. Use CCR for consensus analytics or MyRating for client-specific analytics.

Available options:
CCR,
MyRating
rating_scale
enum<string>
default:CB21

Rating scale used to name the distribution buckets. Use CB21, CB7, or MyScale.

Available options:
CB21,
CB7,
MyScale
effective_date
integer

As-of date in YYYYMMDD format. If omitted, the latest available date is used.

lookback_period
integer
default:0

Number of lookback_unit intervals before effective_date.

Required range: x >= 0
lookback_unit
enum<string>
default:months
Available options:
months,
quarters,
years
facet_column
string

Optional facetable column to group the distribution by. Built-in facetable columns and custom scope.portfolio columns are supported.

result_filter
object

Filtering, sorting, and limiting applied after an analytic has computed its results. filters[].key and sort.field must reference supported result fields for the selected route. Some routes also accept documented alias names that map to returned fields.

Response

Rating distribution retrieved successfully

Rating distribution results.

EffectiveDateId
integer[]
entity_count
integer[]
{key}
(string | integer | number | boolean | null)[]