---
updatedAt: 2026-07-29T09:35:11.000Z
---

# Update statistics

Returns update statistics (count and size) over the requested range and granularity. Omitting the range returns all-time totals.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "CantonView Public API",
    "description": "Public API for accessing Canton Network explorer data through CCView",
    "contact": {
      "name": "API Maintainer",
      "email": "cantonview@pixelplex.io"
    },
    "license": {
      "name": ""
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://ccview.io",
      "description": "Production HTTPS server"
    }
  ],
  "paths": {
    "/api/updates/stats": {
      "get": {
        "tags": [
          "Updates & Verdicts"
        ],
        "summary": "Update statistics",
        "description": "Returns update statistics (count and size) over the requested range and granularity. Omitting the range returns all-time totals.",
        "operationId": "update_stats_v1",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-07-28T13:25:25.425214824Z"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-07-28T13:25:25.425215455Z"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/StatsRangeGranularity"
            },
            "example": "1h"
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/UpdateStatMetric"
              }
            }
          },
          {
            "name": "max_points",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 500,
              "minimum": 1
            },
            "example": 500
          },
          {
            "name": "strict",
            "in": "query",
            "description": "If true, ignores max_points and returns the full-resolution series without downsampling.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Update statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateStatsResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message",
                    "timestamp"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Detailed message description.",
                      "example": "message error"
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "HTTP status code.",
                      "maximum": 599,
                      "minimum": 400
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of error occurrence."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message",
                    "timestamp"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Detailed message description.",
                      "example": "message error"
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "HTTP status code.",
                      "maximum": 599,
                      "minimum": 400
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of error occurrence."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message",
                    "timestamp"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Detailed message description.",
                      "example": "message error"
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "HTTP status code.",
                      "maximum": 599,
                      "minimum": 400
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of error occurrence."
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message",
                    "timestamp"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Detailed message description.",
                      "example": "message error"
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "HTTP status code.",
                      "maximum": 599,
                      "minimum": 400
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of error occurrence."
                    }
                  }
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message",
                    "timestamp"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Detailed message description.",
                      "example": "message error"
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "HTTP status code.",
                      "maximum": 599,
                      "minimum": 400
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of error occurrence."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StatsRangeGranularity": {
        "type": "string",
        "enum": [
          "1h",
          "1d",
          "1w",
          "1m"
        ]
      },
      "UpdateStatMetric": {
        "type": "string",
        "enum": [
          "count",
          "size"
        ]
      },
      "UpdateStatsPoint": {
        "type": "object",
        "required": [
          "record_time"
        ],
        "properties": {
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "record_time": {
            "type": "string",
            "format": "date-time"
          },
          "size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "UpdateStatsResult": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateStatsTotals"
              },
              {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "totals"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateStatsSeries"
              },
              {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "series"
                    ]
                  }
                }
              }
            ]
          }
        ]
      },
      "UpdateStatsSeries": {
        "type": "object",
        "required": [
          "points"
        ],
        "properties": {
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateStatsPoint"
            }
          }
        }
      },
      "UpdateStatsTotals": {
        "type": "object",
        "properties": {
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Updates & Verdicts",
      "description": "General verdicts information"
    }
  ],
  "externalDocs": {
    "url": "https://swagger.io/resources/open-api/",
    "description": "OpenAPI Documentation Reference"
  }
}
```