Get storage use per organization (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
GET /admin/organization/storage-stats

Lists organizations by stored data, largest first, with each case's name, creation date and size in bytes summed from its collection records, optionally only for organizationIds (comma-separated, up to 1000); one page at a time. Super admin only.

Query parameters

  • page number

    Default value is 1.

  • perPage number

    Default value is 10.

  • skip number

    If skip/limit not provided, page/perPage will take precedence

  • limit number

    If skip/limit not provided, page/perPage will take precedence

  • organizationIds array[string]

    Filter by organization ids

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • total number Required
      • page number
      • perPage number
      • skip number
      • limit number
      • totalPages number Required
      • nextPage number | null Required
      • previousPage number | null Required
      • data array[object]
        Hide data attributes Show data attributes object
        • organizationName string Required
        • organizationId string Required
        • totalUsagesInBytes number Required
        • cases array[object] Required
          Hide cases attributes Show cases attributes object
          • caseId string Required
          • caseName string Required
          • caseCreatedAt string(date-time) Required
          • usagesInBytes number Required
    • statusCode number Required
    • timestamp string(date-time) Required
GET /admin/organization/storage-stats
curl \
 --request GET 'http://api.example.com/admin/organization/storage-stats' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "total": 42,
    "page": 1,
    "perPage": 20,
    "skip": 0,
    "limit": 20,
    "totalPages": 3,
    "nextPage": 2,
    "previousPage": 42.0,
    "data": [
      {
        "organizationName": "Example Firm",
        "organizationId": "65a1b2c3d4e5f6a7b8c9d0e3",
        "totalUsagesInBytes": 104857600,
        "cases": [
          {
            "caseId": "65a1b2c3d4e5f6a7b8c9d0e1",
            "caseName": "Smith v. Jones",
            "caseCreatedAt": "2026-01-15T14:30:00.000Z",
            "usagesInBytes": 52428800
          }
        ]
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}