---
title: "Get habit logs"
method: GET
path: "/api/v5/habits/habit-goals/"
tags: ["Habit Goals"]
---

# Get habit logs

`GET /api/v5/habits/habit-goals/`

## Request

- Base URL: `https://api.pavlok.com`
- URL: `https://api.pavlok.com/api/v5/habits/habit-goals/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pavlok/apis/pavlok-api-v5/docs/api/v5/habits/habit-goals/get.ts> (a function with typed inputs; its response is checked against the schema)

Get all habit logs within the specified time interval

## Query parameters

- `user_habit_id` integer, required
- `start_date` string, date, required
- `end_date` string, date, required

## Response `200`

Successful Response

- ListOfHabitGoalsWithPastValueInResponse
  - `habitGoals` HabitGoalWithStartAndLastValues[], required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `deletedAt` string, date-time
    - `id` integer
    - `userHabitId` integer, required
    - `date` string, date, required
    - `goalValue` integer
    - `currentValue` integer
    - `achievedAt` string, date-time
    - `startValue` integer
    - `pastValue` integer

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pavlok/apis/pavlok-api-v5.md) - [All operations](https://skmtc.dev/pavlok/apis/pavlok-api-v5/llms.txt) - [OpenAPI document](https://skmtc.dev/pavlok/apis/pavlok-api-v5/revisions/3d192098b1ac?raw)
