API Documentation
  • Getting Started
  • Changelog
  • Authentication
  • Date Format
  • Response API
  • Core Resources
    • Journal
    • Habits
      • Status
      • Logs
      • Goal
        • Periodicity
    • Actions List
    • Notes
    • Moods
    • Areas
  • Enum
    • Action Status
    • Mood Value
    • Note Type
    • Unit Type
    • Log Method
    • Time Of Day
Powered by GitBook
On this page
  • Properties
  • Available Methods
  • List Logs
  • Add Log
  • Delete Log
  • Delete Logs

Was this helpful?

  1. Core Resources
  2. Habits

Logs

Properties

This table describes all properties of a Log object.

Name

Type

Required

Description

id

String

required

value

Double

required

created_date

Date

required

unit_type

required

habit_id

String

optional

Available Methods

List Logs

GET https://api.habitify.me/logs/:habit_id

Path Parameters

Name
Type
Description

habit_id

string

The habit ID

Query Parameters

Name
Type
Description

from

string

Date Format

to

string

Date Format

Headers

Name
Type
Description

Authorization

string

API Key

{
    "message": "Success",
    "data": [
        {
            "id": "-MaSwylmoPx9MNJlz4YU",
            "value": 1,
            "created_date": "2021-05-24T08:36:18.000Z",
            "unit_type": "step",
            "habit_id": "328B6E88-5DBA-4A21-8B0F-7A3DC5A2996C"
        },
        {
            "id": "-MabvNoRKmD7ylVeiveW",
            "value": 1,
            "created_date": "2021-05-24T08:36:18.000Z",
            "unit_type": "step",
            "habit_id": "328B6E88-5DBA-4A21-8B0F-7A3DC5A2996C"
        }
    ],
    "version": "v1.2",
    "status": true
}

Add Log

POST https://api.habitify.me/logs/:habit_id

Path Parameters

Name
Type
Description

habit_id

string

Headers

Name
Type
Description

Authorization

string

API Key

Request Body

Name
Type
Description

unit_type

string

value

number

target_date

string

Date Format

{
    "message": "Success",
    "data": null,
    "version": "v1.2",
    "status": true
}
{
    "message": "Success",
    "data": null,
    "version": "v1.2",
    "status": true
}

Delete Log

DELETE https://api.habitify.me/logs/:habit_id/:log_id

Path Parameters

Name
Type
Description

habit_id

string

Habit ID

log_id

string

Log ID

Headers

Name
Type
Description

Authorization

string

API Key

{
    "message": "Success",
    "data": null,
    "version": "v1.2",
    "status": true
}

Delete Logs

DELETE https://api.habitify.me/logs/:habit_id

Path Parameters

Name
Type
Description

habit_id

string

Query Parameters

Name
Type
Description

from

string

Date Format

to

string

Date Format

Headers

Name
Type
Description

Authorization

string

API Key

Success
{
  "reason": "No log matching with date range"
}
PreviousStatusNextGoal

Last updated 3 years ago

Was this helpful?

Unit Type