Contrôles : coût et lancement
Consultez le solde Diff et le coût du contrôle, créez un lancement et lisez son état. La référence couvre les méthodes et l’historique des tâches.
Sur cette page
- GET /public-api/v1/diff-projects/{id}/balance
- POST /public-api/v1/diff-projects/{id}/reports/cost
- POST /public-api/v1/diff-projects/{id}/reports/run
- GET /public-api/v1/diff-projects/{id}/reports/runs
- GET /public-api/v1/diff-projects/{id}/reports/runs/{run_id}
Choisissez une méthode dans le sommaire. Vérifiez la méthode HTTP, le chemin, les autorisations, les paramètres obligatoires et le corps. Les blocs JSON contenant schema, properties et $ref décrivent le contrat ; ne les envoyez pas comme corps de requête. Les exemples de requêtes et les schémas de réponse sont identifiés séparément.
GET /public-api/v1/diff-projects/{id}/balance
Paramètres
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffBalanceResponse · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
Réponses
200
Solde et options de paiement.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffBalanceResponse"
}
}
}
}
default
Sans clé valide, les en-têtes de limite concernent les tentatives échouées par IP. Après authentification, ils concernent la clé ou le compte. Ils peuvent être absents en cas de blocage préalable ou de compteur indisponible. X-RateLimit-Reset est un horodatage Unix en secondes ; Retry-After pour 429 est un délai en secondes.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
POST /public-api/v1/diff-projects/{id}/reports/cost
Avant l’estimation du coût, ajoute les nouvelles URL selon le mode enregistré du projet et leur attribue la règle sélectionnée. Les URL existantes et leurs règles sont conservées. L’estimation ne réserve ni ne débite de crédits ou d’argent.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffCostRequest · DiffCostResponse · ErrorResponse · XID
Paramètres
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
Requête
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffCostRequest"
}
}
}
}
Réponses
200
Estimation du coût signée.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffCostResponse"
}
}
}
}
default
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
POST /public-api/v1/diff-projects/{id}/reports/run
Prépare à nouveau les URL avant le paiement. Si le coût final ou le nombre de pages diffère de cost_estimate_id, renvoie 409 cost_estimate_mismatch sans débit. Obtenez une nouvelle estimation et réessayez avec un nouvel Idempotency-Key.
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunRequest · DiffRunResponse · ErrorResponse · XID
Paramètres
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
Idempotency-Key (header)
{
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
Requête
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffRunRequest"
}
}
}
}
Réponses
200
Exécution Diff.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffRunResponse"
}
}
}
}
default
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
GET /public-api/v1/diff-projects/{id}/reports/runs
Paramètres
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunListResponse · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
limit (query)
{
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"default": 100
}
}
offset (query)
{
"schema": {
"type": "integer",
"minimum": 0,
"default": 0
}
}
Réponses
200
Exécutions Diff.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffRunListResponse"
}
}
}
}
default
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
GET /public-api/v1/diff-projects/{id}/reports/runs/{run_id}
Paramètres
Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunResponse · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
run_id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
Réponses
200
Exécution Diff.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffRunResponse"
}
}
}
}
default
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
},
"X-RateLimit-Limit": {
"$ref": "#/components/headers/RateLimitLimit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/RateLimitRemaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/RateLimitResetAt"
},
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"Retry-After": {
"$ref": "#/components/headers/RetryAfter"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
