LogoLogo
  • Introduction
  • Features
  • Getting Started
    • Cortex User Guide
      • Organizations
      • Log in
      • Generate an API key
      • Make your first API request
      • Configure the org settings
      • Set up a data model
        • Create custom objects
        • Add custom properties
      • One-to-many relationships
      • Read and write data
      • Making a Request
      • Handling responses
      • Authentication
      • Two-factor authentication
      • Set third-party cookies
      • Connections
      • Upload files
      • Cortex iOS
      • Get started with Swift
      • Cortex service accounts
      • Cortex developer tools
      • Automated Account Notifications
  • Cortex API
    • Overview
    • Objects
      • Objects Overview
      • Organization
      • Account
      • Connections
      • Notifications
      • Stats
      • Logs
      • Export
      • Events
      • Room
    • Object Definition
      • Object Properties
        • Any
        • Binary
        • Boolean
        • Date
        • Document
        • File
        • Geometry
        • List
        • Number
        • ObjectId
        • Reference
        • String
    • Object Types
    • Access Control
    • Querying
      • Query Operators
      • Property Selection
      • Property Access
    • Aggregating
      • Aggregation Operators
    • Scripting
      • Script Types
      • Script Limits
      • ObjectId
      • CortexObject
        • Accounts
        • Views
      • Cursors
      • Operations
      • Script Modules
        • API Module
        • Base64 Module
        • Cache Module
        • Connections Module
        • Console Module
        • Consts Module
        • Counters Module
        • Crypto Module
        • HTTP Module
        • Logger Module
        • Notifications Module
        • Request Module
        • Response Module
        • SAML Module
        • Schemas Modules
        • Script Module
        • Session Module
        • Util.id Module
        • Util.ip Module
        • Util.paths Module
        • XML Module
        • Developer
        • Config
        • Renderer
        • SFTP
        • FTP
        • DB
          • Cursors
          • Driver
      • Static Methods
        • Accounts
        • Views
        • Cursors
      • Audit
      • Environments
      • HTTP Driver
      • Notifications
        • Firebase Cloud Messaging (FCM)
        • Tencent Push Notification Service Configuration
      • Televisit
      • Transforms
      • Localization
      • Available Javascript Libraries
    • Decorators
      • Runtime
        • Acl
        • As
        • Log
        • Profile
      • Static
        • Env
        • Job
        • Object
        • On
        • Policy
        • Route
        • Transform
        • Trigger
    • Expressions
      • Primer
      • Pipelines
      • Operators
      • Accumulators
      • Variables
      • Conditionals
      • Transforms
      • Triggers
      • On
      • Events
    • Faults
      • Fault Reference
  • Releases
    • Cortex Release Notes
      • Cortex API 2.28.3 (R3.4.6)
      • Cortex API 2.28.1 (R3.4.3)
      • Cortex API 2.27.2 (R3.4.1)
      • Cortex API 2.27.1 (R3.3.5)
      • SQL DB Connector 1.3.4 (R3.3.3)
      • Cortex API 2.26.2 (R3.3.1)
      • Cortex API 2.26.1 (R3.2.2)
      • Cortex API 2.26.0 (R3.2.1)
      • SQL DB Connector 1.3.3
      • Cortex API 2.25.0 (R3.1.1)
      • SQL DB Connector 1.3.2 (R3.1.0)
      • Cortex API 2.24.2 (R3.0.2)
      • SQL DB Connector 1.3.1 (R3.0.0)
      • Cortex API 2.24.1 (R2.3.3)
      • Cortex API 2.24.0 (R2.3.2)
      • SQL DB Connector 1.3.0 (R2.3.0)
      • Cortex API 2.23.0 (R2.2.4)
      • SQL DB Connector 1.2.0 (R2.2.0)
      • Cortex API 2.22.2 (R2.1.2)
      • Cortex API 2.22.1 and SQL DB Connector 1.1.1 (R2.0.1)
      • Cortex API 2.22.0
      • Cortex API 2.21.3
      • Cortex API 2.21.2
      • Cortex Web 4.16.0
      • Cortex Web 4.15.1
      • Cortex API 2.20.1
      • Cortex Web 4.14.0
      • Cortex Renderer 1.3.3
      • Cortex API 2.19.4
      • Cortex API 2.19.3 and Cortex Web 4.13.1
      • Cortex Renderer 1.3.2
      • Cortex API 2.19.1
      • Cortex API 2.18.0
      • Cortex API 2.17.6
      • Cortex API 2.17.5
      • Cortex API 2.17.4
      • Cortex API 2.17.3
      • Cortex API 2.17.2
      • Cortex API 2.17.1
      • Cortex API 2.16.0
      • Cortex API 2.15.9
      • Cortex API 2.15.8-1
      • Cortex 2.15.8
      • Cortex API 2.18.1
      • Cortex API 2.16.1
      • Cortex Renderer 1.3.1
      • Cortex Renderer 1.3.0
      • Cortex Renderer 1.2.2
      • Cortex Renderer 1.2.1
      • Cortex Renderer 1.2.0
    • Third-Party License Attribution

© 2025 Medable, Inc. All rights reserved.

On this page
  • Stat object
  • List

Was this helpful?

  1. Cortex API
  2. Objects

Stats

Stat object

Name

Description

_id ObjectId

The stat object identifier

starting Date

The starting time for this stat time frame.

ending Date

The ending time for this stat time frame.

org ObjectId

The org that this stat lives in

object String

The object name (stat)

code Number

The number that determines what kind of event this stat instance is representing. Request: 0 File Storage: 1 Document Storage: 2 Logins: 3 Accounts: 4 Scripts: 5 Notifications: 6

count Number

How many times this stat event has occurred in the time frame.

size Number

The size of the file or document stored. Used for code 2 stats.

total Number

Similar to count but used for different stat codes.

s_source String

Storage source name (e.g. account)

s_object String

Storage object name (e.g. account)

s_type String

Storage type name

s_property ObjectId

Storage property name

today Number

active Number

location Number

1 if data stored to Medable 2 if stored to Amazon s3

method Number

GET: 0 POST: 1 PUT: 2 DELETE: 3 HEAD: 4 OPTIONS: 5 PATCH: 6

api String

The api endpoint that was called

client ObjectId

The object id of the app that's issuing the request, if defined. (relevant only for request stats)

ms Number

The total number of milliseconds it took to complete this task

in Number

The total number of bytes in

out Number

The total number of bytes out

errs Number

The number of errors

scriptId ObjectId

The script identifier

scriptType String

Script type (like "route", "trigger", etc)

callouts Number

Total number of HTTP callouts used in the script

calloutsMs Number

Total milliseconds of HTTP callouts in the script

ops Number

Number of operations used in the script

notifType ObjectId

The notification object identifier. A notification might be a standard or custom one defined in the Notifications tab of the admin interface.

notifEndpoint ObjectId

The notification endpoint identifier. Each notification might have an email, sms, or push endpoint.

{
  "_id": "575f58bfa588cb8881e49833",
  "api": "",
  "client": null,
  "code": 0,
  "count": 1,
  "ending": "2016-06-14T01:59:59.999Z",
  "in": 0,
  "location": 1,
  "method": 0,
  "ms": 22,
  "object": "stat",
  "org": "575f58271d0c03a53ccc3840",
  "out": 2871,
  "starting": "2016-06-14T01:00:00.000Z"
}

List

GET https://api.dev.medable.com/your_org_name/v2/stats

Path Parameters

Name
Type
Description

your_org_name

string

{
    "data": [
        {
            "_id": "5810f6c3773c2ecc9439e34e",
            "api": "sys",
            "client": null,
            "code": 0,
            "count": 2,
            "ending": "2016-10-26T18:59:59.999Z",
            "in": 2302,
            "location": 1,
            "method": 1,
            "ms": 266,
            "object": "stat",
            "org": "5810f10e6d66738355843d7d",
            "out": 1514,
            "starting": "2016-10-26T18:00:00.000Z"
        },
        {
            "_id": "5810f6c3773c2ecc9439e350",
            "api": "",
            "client": null,
            "code": 0,
            "count": 5,
            "ending": "2016-10-26T18:59:59.999Z",
            "in": 4619,
            "location": 1,
            "method": 0,
            "ms": 222,
            "object": "stat",
            "org": "5810f10e6d66738355843d7d",
            "out": 15400,
            "starting": "2016-10-26T18:00:00.000Z"
        },
        {
            "_id": "5810f6c4773c2ecc9439e352",
            "api": "orgs",
            "client": null,
            "code": 0,
            "count": 25,
            "ending": "2016-10-26T18:59:59.999Z",
            "in": 22794,
            "location": 1,
            "method": 0,
            "ms": 1532,
            "object": "stat",
            "org": "5810f10e6d66738355843d7d",
            "out": 16325,
            "starting": "2016-10-26T18:00:00.000Z"
        },
        {
            "_id": "5810f6c4773c2ecc9439e354",
            "api": "accounts",
            "client": null,
            "code": 0,
            "count": 6,
            "ending": "2016-10-26T18:59:59.999Z",
            "in": 5419,
            "location": 1,
            "method": 0,
            "ms": 410,
            "object": "stat",
            "org": "5810f10e6d66738355843d7d",
            "out": 3786,
            "starting": "2016-10-26T18:00:00.000Z"
        }
      ],
    "hasMore": true,
    "object": "list"
}
{}
$.ajax({
    url: "https://api.dev.medable.com/example/v2/stats",
    method: "GET",
    dataType : "json",
    xhrFields: {
        withCredentials: true
    },
    headers: {
        "Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
    }
}).done(function(data) {
    // ...
});

Last updated 3 years ago

Was this helpful?