Référence de l’API
Tous les endpoints de l’API publique v1, générés depuis le code.
Cette page est générée depuis la spécification OpenAPI de l’API. Téléchargez-la pour générer un client : /openapi/v1.json sur votre site Maketools. Commencez par le guide de démarrage.
Chaque requête porte une clé d’API d’organisation : Authorization: Bearer dg_live_…. Seul /api/v1/* accepte une clé.
Endpoints
Lister les forks
GET /api/v1/forks
Forks de l’organisation propriétaire de la clé (actifs et archivés) : titre, statut, visibilité et release déployée. Jamais leur configuration.
Scope requis : forks:read
Réponse
| Champ | Type | Obligatoire |
|---|---|---|
items |
api.PublicForkDto[] |
oui |
Lire un fork
GET /api/v1/forks/{forkId}
Un fork de l’organisation de la clé. Un fork d’une autre organisation est refusé (403) et la tentative est auditée.
Scope requis : forks:read
Paramètres
| Nom | Emplacement | Type | Obligatoire |
|---|---|---|---|
forkId |
path | string | oui |
Réponse
| Champ | Type | Obligatoire |
|---|---|---|
createdAt |
string | oui |
deployedReleaseNumber |
number | null | oui |
gameId |
string | oui |
id |
string | oui |
major |
number | oui |
slug |
string | oui |
sourceLocale |
common.ContentLocale |
oui |
status |
api.ForkStatus |
oui |
suspended |
boolean | oui |
title |
string | oui |
updatedAt |
string | oui |
visibility |
authz.ForkVisibility |
oui |
Exporter les parties en CSV
GET /api/v1/forks/{forkId}/exports/csv
Une ligne par partie sur la période (en streaming). Chaque export est audité. Sous k-anonymat, le fichier ne contient que sa ligne d’en-tête et la réponse porte X-DG-Report-Suppressed: k-anonymity.
Scope requis : reports:read
Paramètres
| Nom | Emplacement | Type | Obligatoire |
|---|---|---|---|
forkId |
path | string | oui |
from |
query | string | oui |
to |
query | string | oui |
groupId |
query | string | non |
Réponse
Fichier CSV (text/csv, UTF-8).
Statistiques d’un fork
GET /api/v1/forks/{forkId}/stats
Les mêmes chiffres que le tableau de bord des rapports sur une période (from et to : jours ISO inclus, 366 jours au plus). Les joueurs sont pseudonymes sauf si l’organisation a choisi le mode nominatif. Avec groupId, un groupe de moins de 5 joueurs renvoie suppressed: true et aucun chiffre (k-anonymat).
Scope requis : reports:read
Paramètres
| Nom | Emplacement | Type | Obligatoire |
|---|---|---|---|
forkId |
path | string | oui |
from |
query | string | oui |
to |
query | string | oui |
groupId |
query | string | non |
Réponse
| Champ | Type | Obligatoire |
|---|---|---|
avgScorePercent |
number | oui |
completionRate |
number | oui |
daily |
api.DailyStatDto[] |
oui |
passRate |
number | oui |
players |
api.PlayerStatDto[] |
oui |
plays |
number | oui |
reportingMode |
org.ReportingMode |
oui |
skills |
api.SkillStatDto[] |
oui |
suppressed |
boolean | oui |
uniquePlayers |
number | oui |
Erreurs
Les erreurs sont des objets JSON { code, message, details: { code } } dont details.code est stable : ERR_AUTH_REQUIRED (401 : clé absente, mal formée, révoquée ou expirée), ERR_ACCESS_DENIED (403 : scope, organisation ou endpoint non autorisé), ERR_NOT_FOUND (404), ERR_VALIDATION (400 : période invalide), ERR_RATE_LIMITED (429 : 120 requêtes par minute et par clé).
Schémas
api.DailyStatDto
| Champ | Type | Obligatoire |
|---|---|---|
avgScorePercent |
number | oui |
date |
string | oui |
plays |
number | oui |
api.ForkStatus
Valeurs possibles : active | archived
api.PlayerStatDto
| Champ | Type | Obligatoire |
|---|---|---|
bestScorePercent |
number | oui |
lastPlayedAt |
string | oui |
passed |
boolean | oui |
playerLabel |
string | oui |
plays |
number | oui |
api.PublicForkDto
| Champ | Type | Obligatoire |
|---|---|---|
createdAt |
string | oui |
deployedReleaseNumber |
number | null | oui |
gameId |
string | oui |
id |
string | oui |
major |
number | oui |
slug |
string | oui |
sourceLocale |
common.ContentLocale |
oui |
status |
api.ForkStatus |
oui |
suspended |
boolean | oui |
title |
string | oui |
updatedAt |
string | oui |
visibility |
authz.ForkVisibility |
oui |
api.SkillStatDto
| Champ | Type | Obligatoire |
|---|---|---|
attempts |
number | oui |
correctRate |
number | oui |
skillId |
game.SkillId |
oui |
authz.ForkVisibility
Valeurs possibles : public | organization | restricted
common.ContentLocale
Valeurs possibles : en | fr | es | pt | de
game.SkillId
Valeurs possibles : prompting.context | prompting.constraints | prompting.examples | data.quality.duplicates | data.quality.missing | data.quality.formats | data.quality.outliers | ai.critical.hallucination | ai.critical.bias | ai.critical.verification | ai.usage.good-fit | ai.usage.personal-data | ai.usage.accountability | ai.usage.human-review | ai.usage.right-tool | data.leadership.incident | data.leadership.privacy | data.leadership.quality | data.leadership.value | data.leadership.culture | data.leadership.ai-adoption | ai.agents.data-access | ai.agents.tool-permissions | ai.agents.untrusted-content | ai.agents.efficiency | data.reading.charts | data.reading.causation | data.reading.sampling | data.reading.averages | data.reading.proportions
org.ReportingMode
Valeurs possibles : pseudonymous | nominative
Modifier cette page sur GitHub (s'ouvre dans un nouvel onglet)