Statistics

Retrieving server statistics.

The Statistics Model

A statistic is represented by the following schema:

Scheme

  • Name
    captureTime
    Type
    string
    Description
    in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
  • Name
    activeUsers
    Type
    integer
    Description
  • Name
    activeDevices
    Type
    integer
    Description
  • Name
    requests
    Type
    integer
    Description
  • Name
    messagesReceived
    Type
    integer
    Description
  • Name
    messagesStored
    Type
    integer
    Description

GET/statistics

Retrieve server statistics

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Query Parameters

  • Name
    from
    Type
    string <date-time> required
    Description

    in ISO 8601 format. eg. 1963-11-22T18:30:00Z

  • Name
    to
    Type
    string <date-time> required
    Description

    in ISO 8601 format. eg. 1963-11-22T18:30:00Z

  • Name
    refresh
    Type
    boolean
    Description

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Array of Statistics

Request

GET
/statistics
curl --location 'https://gw.onemap8.com/api/statistics?from=%3CdateTime%3E&to=%3CdateTime%3E' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

[
    {
        "captureTime": "2019-08-24T14:15:22Z",
        "activeUsers": 0,
        "activeDevices": 0,
        "requests": 0,
        "messagesReceived": 0,
        "messagesStored": 0
    },
    {
        ...
    }
]