{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-list-bytes-accessed-response-schema.json",
  "title": "ListBytesAccessedResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-workspaces-api-openapi.yml#/components/schemas/ListBytesAccessedResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array",
          "description": "One row per (hour, attributed clientId, table), newest first",
          "items": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "The hourly bucket (log hour) the usage was recorded in"
              },
              "clientId": {
                "type": "string",
                "format": "uuid",
                "description": "API credential (see POST /oauth/clients) the reads were attributed to"
              },
              "clientLabel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the credential, resolved from POST /oauth/clients (null if the credential was revoked)"
              },
              "tableName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Iceberg table the reads hit (null for rows written before per-table attribution)"
              },
              "bytesAccessedMB": {
                "type": "number",
                "description": "Megabytes read in the hour by this client/table"
              },
              "requestCount": {
                "type": "integer",
                "description": "Number of S3 GET requests (reads)"
              },
              "creditsCharged": {
                "type": "number",
                "description": "Credits charged for this hour's reads"
              }
            }
          }
        },
        "clients": {
          "type": "array",
          "description": "The workspace's catalog credentials, for populating a client-label filter",
          "items": {
            "type": "object",
            "properties": {
              "clientId": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string"
              }
            }
          }
        },
        "pageSize": {
          "type": "integer"
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the next page; null when there are no more matching records"
        }
      }
    }
  }
}