Home / Change checks: cost and execution

Change checks: cost and execution

Read the Diff balance and check cost, create a run and retrieve its status. This reference covers run methods and the history of submitted jobs.

On this page

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

GET /public-api/v1/diff-projects/{id}/balance

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffBalanceResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

200

Balance and payment options.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffBalanceResponse"
      }
    }
  }
}

default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "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

Before estimating the cost, adds new URLs according to the saved project mode and assigns the selected rule to them. Existing URLs and their rules are preserved. Estimation does not reserve or spend credits or money.

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffCostRequest · DiffCostResponse · ErrorResponse · XID

Parameters

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostRequest"
      }
    }
  }
}

Responses

200

Signed cost estimate.

{
  "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

Prepares URLs again before payment. If the final cost or page count differs from cost_estimate_id, returns 409 cost_estimate_mismatch without charging. Get a new estimate and retry with a new Idempotency-Key.

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunRequest · DiffRunResponse · ErrorResponse · XID

Parameters

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Idempotency-Key (header)

{
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunRequest"
      }
    }
  }
}

Responses

200

Diff run.

{
  "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

Parameters

Related data models: 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
  }
}

Responses

200

Diff runs.

{
  "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}

Parameters

Related data models: 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"
  }
}

Responses

200

Diff run.

{
  "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"
      }
    }
  }
}