# Activity and Exercise

The `exerciseTracker` query helps you to get the total time of registered activity minutes the user has recorded in the given date range.

### Required Arguments

<table data-header-hidden><thead><tr><th></th><th width="219"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Description</td></tr><tr><td><code>start</code></td><td>DateTime!</td><td>The <em>starting</em> date when the exercise will be counted. Use the format: <code>YYYY-MM-DDT hh:mm:ssZ</code></td></tr><tr><td><code>end</code></td><td>DateTime!</td><td>The <em>end</em> date when the exercise will be counted. Use the format: <code>YYYY-MM-DDT hh:mm:ssZ</code></td></tr><tr><td><code>first</code></td><td>Int</td><td>Retrieves the first results from the list.</td></tr><tr><td><code>after</code></td><td>String</td><td>It takes the <em>cursor type</em> and retrieves results after that position.</td></tr><tr><td><code>id</code></td><td>ID</td><td>Id of the exercise record.</td></tr><tr><td><code>source</code></td><td>String</td><td>Source of input, <strong>default</strong> is set to <strong>suggestic</strong>.</td></tr></tbody></table>

### Available Fields

|                             |                    |                                                                                                                                                                |
| --------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Field Name                  | Type               | Description                                                                                                                                                    |
| `dailyGoal`                 | Int                | Daily Exercise Goal in min.                                                                                                                                    |
| `totalTime`                 | Int                | Total Exercise time in min                                                                                                                                     |
| `hasNextPage`               | Boolean            | <p>Displays whether there are results in the connection after the current segment.</p><p> </p>                                                                 |
| `hasPreviousPage`           | Boolean            | Displays whether there are results in the connection before the current segment.                                                                               |
| `dateTime`                  | DateTime!          | Date of record `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                         |
| `durationMinutes`           | Int!               | Sleep quality index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality               |
| `source`                    | String             | Source of input, **default** is set to **suggestic**.                                                                                                          |
| `id`                        | ID!                | Id of the record.                                                                                                                                              |
| `intensity`                 | ExerciseIntensity! | <p>Exercise Intensity:<br>LOW, MODERATE, VIGOROUS</p>                                                                                                          |
| `type`                      | ExerciseType!      | <p>Exercise Type:<br>BREATHWORK, CARDIO, CYCLE, DANCE, HIKE, JOG\_OR\_RUN, OTHER, PILATES, RECOVERY, STRENGTH, STRETCH, SWIM, WALK, WORKOUT\_ROUTINE, YOGA</p> |
| `calories`                  | Int                | Calories burned.                                                                                                                                               |
| `totalTimeperType`          | DailyExerciseTime  | DailyExerciseTime Obj.                                                                                                                                         |
| `totalTimperType.totalTime` | Int!               | Total time in min.                                                                                                                                             |
| `totalTimperType.type`      | String             | <p>Type:<br>STRENGHT, CARDIO</p>                                                                                                                               |

### Example

{% tabs %}
{% tab title="Request" %}

```graphql
query{
  exerciseTracker(start:"2023-01-01" end:"2023-04-13"){
    pageInfo{
      hasNextPage
      hasPreviousPage
    }
    edges{
      node{
        calories
        datetime
        id
        intensity
        type
        durationMinutes
      }
    }
    
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "exerciseTracker": {
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false
      },
      "edges": [
        {
          "node": {
            "calories": 200,
            "datetime": "2023-01-02T17:17:45+00:00",
            "id": "RXhlcmNpc2VFbnRyeTo3NjQ1Mg==",
            "intensity": "VIGOROUS",
            "type": "STRENGTH",
            "durationMinutes": 60
          }
        },
        {
          "node": {
            "calories": 180,
            "datetime": "2023-01-03T14:23:06+00:00",
            "id": "RXhlcmNpc2VFbnRyeTo3Nzc4Mg==",
            "intensity": "VIGOROUS",
            "type": "STRENGTH",
            "durationMinutes": 50
          }
        },
        {
          "node": {
            "calories": 360,
            "datetime": "2023-01-03T15:23:06+00:00",
            "id": "RXhlcmNpc2VFbnRyeTo3Nzc3MA==",
            "intensity": "MODERATE",
            "type": "CARDIO",
            "durationMinutes": 50
          }
        },
        {
          "node": {
            "calories": null,
            "datetime": "2023-01-03T15:36:06+00:00",
            "id": "RXhlcmNpc2VFbnRyeTo3Nzc3MQ==",
            "intensity": "LOW",
            "type": "CARDIO",
            "durationMinutes": 50
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/queries/tracking/activity-and-exercise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
