Skip to main content
POST
/
analytics
/
v2
/
data
/
aggregatetrend
Aggregate Trend
curl --request POST \
  --url https://gateway.creditbenchmark.com/analytics/v2/data/aggregatetrend \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": "CCR",
  "rating_scale": "CB21",
  "effective_date": 20250930,
  "lookback_period": 24,
  "lookback_unit": "months",
  "scope": {
    "portfolio": {
      "CBId": [
        "CB0000022706",
        "CB0000022177"
      ]
    }
  }
}
'
{
  "EffectiveDateId": [
    20240731,
    20240831
  ],
  "entity_count": [
    2,
    2
  ],
  "CCRPD_log": [
    -5.82,
    -5.79
  ],
  "CCRPD": [
    0.00297,
    0.00306
  ],
  "CCRPD_index": [
    0,
    0.03
  ],
  "CCR": [
    "bbb-",
    "bbb-"
  ]
}

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 to map results onto. Use CB21, CB7, or MyScale for the requesting bank's master scale.

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:24

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 segment the aggregate. 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

Aggregate trend retrieved successfully

Aggregate trend results.

EffectiveDateId
integer[]
entity_count
integer[]
CCRPD_log
number[]
CCRPD
number[]
CCRPD_index
number[]
CCR
(string | integer | number | boolean | null)[]
ClientPD_log
number[]
ClientPD
number[]
ClientPD_index
number[]
ClientRating
(string | integer | number | boolean | null)[]
ClientRatingNotch
number[]
ExMePD_log
number[]
ExMePD
number[]
ExMePD_index
number[]
ExMeRating
(string | integer | number | boolean | null)[]
ExMeRatingNotch
number[]
{key}
(string | integer | number | boolean | null)[]