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": "CB_Country",
"operator": "==",
"values": "United States"
}
]
},
"facet_column": "CB_Sector"
}
'import requests
url = "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution"
payload = {
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": { "filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
] },
"facet_column": "CB_Sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: 'CCR',
rating_scale: 'CB21',
effective_date: 20250930,
lookback_period: 12,
lookback_unit: 'months',
scope: {filters: [{key: 'CB_Country', operator: '==', values: 'United States'}]},
facet_column: 'CB_Sector'
})
};
fetch('https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => 'CCR',
'rating_scale' => 'CB21',
'effective_date' => 20250930,
'lookback_period' => 12,
'lookback_unit' => 'months',
'scope' => [
'filters' => [
[
'key' => 'CB_Country',
'operator' => '==',
'values' => 'United States'
]
]
],
'facet_column' => 'CB_Sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution"
payload := strings.NewReader("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}"
response = http.request(request)
puts response.read_body{
"CB_Sector": [
"Banks",
"Financial Services"
],
"CB_Effective_Date_ID": [
20250831,
20250731
],
"AGG_EntityCount": [
14,
9
],
"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
]
}{
"error": "Invalid request parameters: scope requires at least 'portfolio' or 'filters'."
}{
"detail": "Unauthorized request"
}{
"error": "Client-backed analytics inputs require contributor entitlement."
}{
"detail": [
{
"loc": [
"body",
"effective_date"
],
"msg": "Input should be a valid integer",
"type": "int_parsing"
}
]
}{
"error": "Rate limit exceeded",
"detail": "60 per 1 minute"
}{
"error": "An error occurred while processing your request. Please try again later."
}Share of entities in each rating bucket over time for a scoped universe.
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": "CB_Country",
"operator": "==",
"values": "United States"
}
]
},
"facet_column": "CB_Sector"
}
'import requests
url = "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution"
payload = {
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": { "filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
] },
"facet_column": "CB_Sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: 'CCR',
rating_scale: 'CB21',
effective_date: 20250930,
lookback_period: 12,
lookback_unit: 'months',
scope: {filters: [{key: 'CB_Country', operator: '==', values: 'United States'}]},
facet_column: 'CB_Sector'
})
};
fetch('https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => 'CCR',
'rating_scale' => 'CB21',
'effective_date' => 20250930,
'lookback_period' => 12,
'lookback_unit' => 'months',
'scope' => [
'filters' => [
[
'key' => 'CB_Country',
'operator' => '==',
'values' => 'United States'
]
]
],
'facet_column' => 'CB_Sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution"
payload := strings.NewReader("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/analytics/v2/data/ratingdistribution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}"
response = http.request(request)
puts response.read_body{
"CB_Sector": [
"Banks",
"Financial Services"
],
"CB_Effective_Date_ID": [
20250831,
20250731
],
"AGG_EntityCount": [
14,
9
],
"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
]
}{
"error": "Invalid request parameters: scope requires at least 'portfolio' or 'filters'."
}{
"detail": "Unauthorized request"
}{
"error": "Client-backed analytics inputs require contributor entitlement."
}{
"detail": [
{
"loc": [
"body",
"effective_date"
],
"msg": "Input should be a valid integer",
"type": "int_parsing"
}
]
}{
"error": "Rate limit exceeded",
"detail": "60 per 1 minute"
}{
"error": "An error occurred while processing your request. Please try again later."
}Authorizations
JWT bearer token.
Body
Defines the input universe. Use portfolio, filters, or both.
Show child attributes
Show child attributes
Metric to compute. Use CCR for consensus analytics or MyRating for client-specific analytics.
CCR, MyRating Rating scale used to name the distribution buckets. Use CB21, CB7, or MyScale.
CB21, CB7, MyScale As-of date in YYYYMMDD format. If omitted, the latest available date is used.
Number of lookback_unit intervals before effective_date.
x >= 0months, quarters, years Optional facetable column to group the distribution by. Built-in facetable columns and custom scope.portfolio columns are supported.
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.
Show child attributes
Show child attributes
Was this page helpful?

