Records

GET /api/records

Obtenir tous les records pour l'utilisateur authentifié.

Les types de records suivants sont disponibles, en fonction du sport :
  • allure moyenne (record_type : AP)

  • vitesse moyenne (record_type : AS)

  • meilleure allure (record_type : BP)

  • distance la plus élevée (record_type : FD)

  • dénivelé le plus élevé (record_type : HA)

  • durée la plus longue (record_type : LD)

  • vitesse maximale (record_type : MS)

Scope : workouts:read

Exemple de requête :

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

Exemple de réponses :

  • retournant des records

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

{
  "data": {
    "records": [
      {
        "id": 14,
        "record_type": "AP",
        "sport_id": 5,
        "user": "admin",
        "value": "0:07:01",
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 9,
        "record_type": "AS",
        "sport_id": 5,
        "user": "admin",
        "value": 8.55,
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 15,
        "record_type": "BP",
        "sport_id": 5,
        "user": "admin",
        "value": "0:05:58",
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 10,
        "record_type": "FD",
        "sport_id": 5,
        "user": "admin",
        "value": 2.858,
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 13,
        "record_type": "HA",
        "sport_id": 5,
        "user": "Sam",
        "value": 7.029,
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 11,
        "record_type": "LD",
        "sport_id": 5,
        "user": "admin",
        "value": "0:20:24",
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      },
      {
        "id": 12,
        "record_type": "MS",
        "sport_id": 5,
        "user": "admin",
        "value": 10.06,
        "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT",
        "workout_id": "hvYBqYBRa7wwXpaStWR4V2"
      }
    ]
  },
  "status": "success"
}
  • pas de record

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

{
  "data": {
    "records": []
  },
  "status": "success"
}
En-têtes de requête:
Codes d'état:
  • 200 OK -- success

  • 401 Unauthorized --

    • provide a valid auth token

    • signature expired, please log in again

    • invalid token, please log in again

  • 403 Forbidden --

    • you do not have permissions, your account is suspended