> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creditbenchmark.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Choix d’un parcours de données ou d’analyse

> Comment choisir la route API Credit Benchmark adaptée aux données brutes d’entités, aux analyses calculées, à la découverte de métadonnées, aux tendances de portefeuille, aux évolutions de notation ou aux distributions de notation.

export const AnalyticsRouteMatrix = () => <div style={{
  display: 'grid',
  gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
  border: '2px solid #64748b',
  borderRadius: '6px',
  overflow: 'hidden',
  background: '#ffffff',
  fontFamily: 'inherit'
}}>

    <div style={{
  borderRight: '1px solid #94a3b8',
  borderBottom: '1px solid #94a3b8',
  display: 'flex',
  flexDirection: 'column'
}}>
      <div style={{
  padding: '10px 14px',
  background: '#e2e8f0',
  borderBottom: '1px solid #94a3b8',
  fontSize: '12px',
  fontWeight: 700,
  color: '#0f172a',
  letterSpacing: '0.01em'
}}>Portfolio trend</div>
      <div style={{
  padding: '14px'
}}>
        <div style={{
  display: 'flex',
  gap: '8px',
  alignItems: 'stretch'
}}>
          <div style={{
  fontSize: '11px',
  fontWeight: 700,
  color: '#334155',
  writingMode: 'vertical-rl',
  transform: 'rotate(180deg)',
  textAlign: 'center',
  paddingBottom: '4px'
}}>PD</div>

          <div style={{
  flex: 1,
  minWidth: 0
}}>
            <div style={{
  display: 'flex',
  gap: '6px'
}}>
              <div style={{
  width: '34px',
  height: '152px',
  display: 'flex',
  flexDirection: 'column',
  justifyContent: 'space-between',
  fontSize: '10px',
  color: '#475569',
  textAlign: 'right',
  paddingTop: '2px',
  paddingBottom: '18px'
}}>
                <span>0.50%</span>
                <span>0.40%</span>
                <span>0.30%</span>
              </div>

              <div style={{
  position: 'relative',
  flex: 1,
  height: '152px',
  borderLeft: '2px solid #334155',
  borderBottom: '2px solid #334155',
  background: '#f8fafc',
  overflow: 'visible'
}}>
                <div style={{
  position: 'absolute',
  left: 0,
  right: 0,
  top: '2px',
  borderTop: '1px dashed #dbe4ee'
}} />
                <div style={{
  position: 'absolute',
  left: 0,
  right: 0,
  top: '50%',
  borderTop: '1px dashed #dbe4ee'
}} />

                <svg viewBox="0 0 100 100" preserveAspectRatio="none" style={{
  position: 'absolute',
  left: 0,
  top: 0,
  width: '100%',
  height: 'calc(100% - 2px)'
}} aria-hidden="true">
                  <path d="M 0 18 L 9.09 20 L 18.18 22 L 27.27 25 L 36.36 28 L 45.45 31 L 54.55 35 L 63.64 39 L 72.73 43 L 81.82 48 L 90.91 53 L 100 58" fill="none" stroke="#1e40af" strokeWidth="2.5" vectorEffect="non-scaling-stroke" />
                </svg>

                <div style={{
  position: 'absolute',
  left: '0%',
  top: '18%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '9.09%',
  top: '20%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '18.18%',
  top: '22%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '27.27%',
  top: '25%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '36.36%',
  top: '28%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '45.45%',
  top: '31%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '54.55%',
  top: '35%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '63.64%',
  top: '39%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '72.73%',
  top: '43%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '81.82%',
  top: '48%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '90.91%',
  top: '53%',
  width: '7px',
  height: '7px',
  marginLeft: '-3.5px',
  marginTop: '-3.5px',
  borderRadius: '50%',
  background: '#1e40af'
}} />
                <div style={{
  position: 'absolute',
  left: '100%',
  top: '58%',
  width: '8px',
  height: '8px',
  marginLeft: '-4px',
  marginTop: '-4px',
  borderRadius: '50%',
  background: '#1e3a8a',
  border: '2px solid #ffffff'
}} />

                <div style={{
  position: 'absolute',
  left: '0%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '9.09%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '18.18%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '27.27%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '36.36%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '45.45%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '54.55%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '63.64%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '72.73%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '81.82%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '90.91%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '100%',
  bottom: '-8px',
  width: '1px',
  height: '6px',
  background: '#334155',
  marginLeft: '-0.5px'
}} />

                <div style={{
  position: 'absolute',
  left: '-6px',
  bottom: '0%',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginBottom: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '-6px',
  bottom: '50%',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginBottom: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '-6px',
  top: '2px',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginTop: '-0.5px'
}} />
              </div>
            </div>

            <div style={{
  display: 'flex',
  justifyContent: 'space-between',
  marginLeft: '40px',
  marginTop: '10px',
  paddingRight: '2px',
  fontSize: '10px',
  color: '#475569'
}}>
              <span>Jan</span>
              <span>Apr</span>
              <span>Jul</span>
              <span>Oct</span>
            </div>
            <div style={{
  textAlign: 'center',
  marginTop: '6px',
  fontSize: '11px',
  fontWeight: 700,
  color: '#334155'
}}>Month</div>
          </div>
        </div>
      </div>
    </div>

    <div style={{
  borderBottom: '1px solid #94a3b8',
  display: 'flex',
  flexDirection: 'column'
}}>
      <div style={{
  padding: '10px 14px',
  background: '#e2e8f0',
  borderBottom: '1px solid #94a3b8',
  fontSize: '12px',
  fontWeight: 700,
  color: '#0f172a',
  letterSpacing: '0.01em'
}}>Rating distribution</div>
      <div style={{
  padding: '14px'
}}>
        <div style={{
  display: 'flex',
  gap: '8px',
  alignItems: 'stretch'
}}>
          <div style={{
  fontSize: '11px',
  fontWeight: 700,
  color: '#334155',
  writingMode: 'vertical-rl',
  transform: 'rotate(180deg)',
  textAlign: 'center',
  paddingBottom: '4px'
}}>Share</div>

          <div style={{
  flex: 1,
  minWidth: 0
}}>
            <div style={{
  display: 'flex',
  gap: '6px'
}}>
              <div style={{
  width: '34px',
  height: '152px',
  display: 'flex',
  flexDirection: 'column',
  justifyContent: 'space-between',
  fontSize: '10px',
  color: '#475569',
  textAlign: 'right',
  paddingTop: '2px',
  paddingBottom: '18px'
}}>
                <span>40%</span>
                <span>20%</span>
                <span>0%</span>
              </div>

              <div style={{
  position: 'relative',
  flex: 1,
  height: '152px',
  borderLeft: '2px solid #334155',
  borderBottom: '2px solid #334155',
  background: '#f8fafc'
}}>
                <div style={{
  position: 'absolute',
  left: 0,
  right: 0,
  top: '2px',
  borderTop: '1px dashed #dbe4ee'
}} />
                <div style={{
  position: 'absolute',
  left: 0,
  right: 0,
  top: '50%',
  borderTop: '1px dashed #dbe4ee'
}} />

                <div style={{
  position: 'absolute',
  left: '6px',
  right: '6px',
  bottom: 0,
  top: 0,
  display: 'flex',
  alignItems: 'flex-end',
  justifyContent: 'space-between',
  gap: '6px',
  padding: '0 2px'
}}>
                  <div style={{
  flex: 1,
  height: '34%',
  background: '#7c3aed',
  opacity: 0.85
}} />
                  <div style={{
  flex: 1,
  height: '52%',
  background: '#7c3aed',
  opacity: 0.85
}} />
                  <div style={{
  flex: 1,
  height: '68%',
  background: '#6d28d9'
}} />
                  <div style={{
  flex: 1,
  height: '78%',
  background: '#5b21b6'
}} />
                  <div style={{
  flex: 1,
  height: '58%',
  background: '#7c3aed',
  opacity: 0.85
}} />
                  <div style={{
  flex: 1,
  height: '42%',
  background: '#7c3aed',
  opacity: 0.85
}} />
                  <div style={{
  flex: 1,
  height: '26%',
  background: '#7c3aed',
  opacity: 0.65
}} />
                </div>

                <div style={{
  position: 'absolute',
  left: '-6px',
  bottom: '0%',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginBottom: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '-6px',
  bottom: '50%',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginBottom: '-0.5px'
}} />
                <div style={{
  position: 'absolute',
  left: '-6px',
  top: '2px',
  width: '6px',
  height: '1px',
  background: '#334155',
  marginTop: '-0.5px'
}} />
              </div>
            </div>

            <div style={{
  display: 'flex',
  justifyContent: 'space-between',
  marginLeft: '40px',
  marginTop: '10px',
  paddingLeft: '4px',
  paddingRight: '2px',
  fontSize: '10px',
  color: '#475569'
}}>
              <span>a-</span>
              <span>bbb+</span>
              <span>bbb</span>
              <span>bbb-</span>
              <span>bb+</span>
              <span>bb</span>
              <span>bb-</span>
            </div>
            <div style={{
  textAlign: 'center',
  marginTop: '6px',
  fontSize: '11px',
  fontWeight: 700,
  color: '#334155'
}}>Rating</div>
          </div>
        </div>
      </div>
    </div>

    <div style={{
  borderRight: '1px solid #94a3b8',
  display: 'flex',
  flexDirection: 'column'
}}>
      <div style={{
  padding: '10px 14px',
  background: '#e2e8f0',
  borderBottom: '1px solid #94a3b8',
  fontSize: '12px',
  fontWeight: 700,
  color: '#0f172a',
  letterSpacing: '0.01em'
}}>Sector breakdown</div>
      <div style={{
  padding: '10px 14px 12px'
}}>
        <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 56px 56px',
  gap: '8px',
  padding: '0 0 6px',
  borderBottom: '1px solid #cbd5e1',
  fontSize: '10px',
  fontWeight: 700,
  color: '#334155',
  textTransform: 'uppercase',
  letterSpacing: '0.04em'
}}>
          <span>Sector</span>
          <span style={{
  textAlign: 'right'
}}>Rating</span>
          <span style={{
  textAlign: 'right'
}}>PD</span>
        </div>

        <div style={{
  display: 'flex',
  flexDirection: 'column'
}}>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 56px 56px',
  gap: '8px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155',
  borderBottom: '1px solid #f1f5f9'
}}>
            <span>Financials</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>bbb</span>
            <span style={{
  textAlign: 'right'
}}>0.42%</span>
          </div>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 56px 56px',
  gap: '8px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155',
  borderBottom: '1px solid #f1f5f9'
}}>
            <span>Utilities</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>bbb+</span>
            <span style={{
  textAlign: 'right'
}}>0.35%</span>
          </div>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 56px 56px',
  gap: '8px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155'
}}>
            <span>Industrials</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>bb+</span>
            <span style={{
  textAlign: 'right'
}}>0.58%</span>
          </div>
        </div>
      </div>
    </div>

    <div style={{
  display: 'flex',
  flexDirection: 'column'
}}>
      <div style={{
  padding: '10px 14px',
  background: '#e2e8f0',
  borderBottom: '1px solid #94a3b8',
  fontSize: '12px',
  fontWeight: 700,
  color: '#0f172a',
  letterSpacing: '0.01em'
}}>Rating changes</div>
      <div style={{
  padding: '10px 14px 12px'
}}>
        <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 44px 44px 52px',
  gap: '6px',
  padding: '0 0 6px',
  borderBottom: '1px solid #cbd5e1',
  fontSize: '10px',
  fontWeight: 700,
  color: '#334155',
  textTransform: 'uppercase',
  letterSpacing: '0.04em'
}}>
          <span>Entity</span>
          <span style={{
  textAlign: 'right'
}}>Prior</span>
          <span style={{
  textAlign: 'right'
}}>Now</span>
          <span style={{
  textAlign: 'right'
}}>Move</span>
        </div>

        <div style={{
  display: 'flex',
  flexDirection: 'column'
}}>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 44px 44px 52px',
  gap: '6px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155',
  borderBottom: '1px solid #f1f5f9'
}}>
            <span>Ford Motor Co.</span>
            <span style={{
  textAlign: 'right'
}}>bb+</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>bb</span>
            <span style={{
  textAlign: 'right',
  color: '#dc2626',
  fontWeight: 600
}}>↓ 1</span>
          </div>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 44px 44px 52px',
  gap: '6px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155',
  borderBottom: '1px solid #f1f5f9'
}}>
            <span>Vodafone Group</span>
            <span style={{
  textAlign: 'right'
}}>bbb-</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>bbb</span>
            <span style={{
  textAlign: 'right',
  color: '#059669',
  fontWeight: 600
}}>↑ 1</span>
          </div>
          <div style={{
  display: 'grid',
  gridTemplateColumns: '1fr 44px 44px 52px',
  gap: '6px',
  padding: '8px 0',
  fontSize: '10px',
  color: '#334155'
}}>
            <span>Unilever PLC</span>
            <span style={{
  textAlign: 'right'
}}>a-</span>
            <span style={{
  textAlign: 'right',
  fontWeight: 600
}}>a-</span>
            <span style={{
  textAlign: 'right',
  color: '#94a3b8'
}}>—</span>
          </div>
        </div>
      </div>
    </div>

  </div>;

L’API sépare l’extraction des données brutes, les analyses calculées et la découverte des métadonnées. Choisissez la route dont le format de sortie correspond à vos besoins : lignes d’entités brutes, une courbe de tendance, un histogramme de notation, un tableau sectoriel, une liste des valeurs les plus volatiles ou des métadonnées de référence.

Les quatre routes d’analyse calculent des résumés côté serveur à partir de votre `scope`. Utilisez `getdata` lorsque vous avez besoin d’une ligne par entité et par date. Utilisez les routes de métadonnées avant de créer une interface utilisateur ou une intégration, en particulier `metadata/columns` pour connaître les noms de champs, types de données, filtres, facettes et droits disponibles.

<Frame caption="Output shape by route: portfolio trend, rating distribution, sector breakdown, and rating changes.">
  <AnalyticsRouteMatrix />
</Frame>

## Routes de données et d’analyse

| Route                | Données d’entrée requises | Quand l’utiliser                                                                                 |
| -------------------- | ------------------------- | ------------------------------------------------------------------------------------------------ |
| `getdata`            | `scope`                   | Exports, séries chronologiques ou modèles en aval à partir de champs bruts au niveau des entités |
| `aggregatetrend`     | `scope`                   | Évolution de la qualité de crédit du portefeuille                                                |
| `creditbreakdown`    | `scope`, `facet_column`   | Dernier récapitulatif par secteur, pays ou colonne de portefeuille personnalisée                 |
| `entityratingchange` | `scope`                   | Mises à niveau, rétrogradations ou variations de Consensus PD sur une fenêtre rétrospective      |
| `ratingdistribution` | `scope`                   | Composition d’un portefeuille par niveau de notation                                             |

## Routes de métadonnées

| Itinéraire                  | Données d’entrée requises | Quand l’utiliser                                                                                                                                |
| --------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `metadata/columns`          | Aucun                     | Vérifiez les noms de champs côté requête, les types de données, les filtres de portée, les facettes et les exigences en matière d’autorisations |
| `metadata/rating-scales`    | Aucun                     | Chargement des métadonnées CB21, CB7 et à l’échelle du client pour les étiquettes, l’ordre et les mappages de bandes                            |
| `metadata/industry-schema`  | Aucun                     | Créer des filtres de hiérarchie sectorielle ou mapper les niveaux sectoriels                                                                    |
| `metadata/geography-schema` | Aucun                     | Créer des filtres de hiérarchie géographique ou mapper des pays à des régions                                                                   |
| `metadata/available-dates`  | Aucun                     | Retrouvez les dernières dates d’entrée en vigueur disponibles et définitives                                                                    |

Si vous prévoyez déjà d’agréger, de répartir par tranches, de trier ou de regrouper les données vous-même, privilégiez la route analytique plutôt que d’extraire des lignes `getdata` et de les reformater côté client.

## Ordre de la requête

Chaque route analytique suit le même ordre :

1. **`scope`** sélectionne l’univers d’entrée.
2. La route calcule son résultat pour cet univers.
3. **`result_filter`** reformate les lignes renvoyées.

`scope.filters` détermine quelles entités sont prises en compte dans l’analyse. `result_filter.filters` Ne filtre que les lignes renvoyées. Consultez la section « [Portée et résultats vides](/api-reference/analytics-scope-and-empty-results)» pour connaître les modèles et les cas limites.

Pour `metric` et `rating_scale`, consultez [Métriques et échelles](/api-reference/metrics-and-rating-scales). Pour les charges utiles de type « copier-coller », consultez [Exemples de charges utiles](/api-reference/analytics-payload-examples).
