Records

GET /api/records

Get all records for authenticated user.

Following types of records are available:
  • average speed (record_type: ‘AS’)

  • farest distance (record_type: ‘FD’)

  • longest duration (record_type: ‘LD’)

  • maximum speed (record_type: ‘MS’)

Example request:

GET /api/records HTTP/1.1
Content-Type: application/json

Example responses:

  • returning records

HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": {
    "records": [
      {
        "activity_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "activity_id": 4,
        "id": 9,
        "record_type": "AS",
        "sport_id": 1,
        "user": "admin",
        "value": 18
      },
      {
        "activity_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "activity_id": 4,
        "id": 10,
        "record_type": "FD",
        "sport_id": 1,
        "user": "admin",
        "value": 18
      },
      {
        "activity_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "activity_id": 7,
        "id": 11,
        "record_type": "LD",
        "sport_id": 1,
        "user": "admin",
        "value": "1:01:00"
      },
      {
        "activity_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "activity_id": 4,
        "id": 12,
        "record_type": "MS",
        "sport_id": 1,
        "user": "admin",
        "value": 18
      }
    ]
  },
  "status": "success"
}
  • no records

HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": {
    "records": []
  },
  "status": "success"
}
Parameters
  • auth_user_id (integer) – authenticate user id (from JSON Web Token)

Request Headers
Status Codes
  • 200 OK – success

  • 401 Unauthorized

    • Provide a valid auth token.

    • Signature expired. Please log in again.

    • Invalid token. Please log in again.