All endpoints require user authorization.
Gets user info
{
id: string,
displayName: string,
email: string,
defaultProject: string
}
Gets all [sessions,] task, and projects for user [that were updated since last sync]
query params:
- [
sync_token
]: sync token from last sync. Defaults to"*"
to get all sessions and a new sync token
{
syncToken: string,
sessions?: [{
taskId: string,
startTimestamp: Date,
duration: Date,
note?: string,
type: "session" | "break" | "long-break",
edited: boolean,
retroAdded: boolean
lastUpdated: Date
}],
tasks?: [{
id: string,
title?: string,
projectId: string,
isCompleted: boolean,
lastUpdated: Date
}],
projects?: [{
id: string,
title?: string,
isArchived: boolean,
lastUpdated: Date
}]
}
Gets all sessions for user [with a startTimestamp within the provided range]
query params:
- [
start
]: select sessions with startTimestamp >= start - [
end
]: select sessions with startTimestamp < end
{
sessions: [{
taskId: string,
startTimestamp: Date,
duration: Date,
note?: string,
type: "session" | "break" | "long-break",
edited: boolean,
retroAdded: boolean,
lastUpdated: Date
}],
}
Gets session with given id.
{
session: {
taskId: string,
startTimestamp: Date,
duration: Date,
note?: string,
type: "session" | "break" | "long-break",
edited: boolean,
retroAdded: boolean,
lastUpdated: Date
},
}
Creates a new session. Creates a projects and/or task as needed (if title is provided instead of id).
Note: It would be cool if active/incomplete project/task titles were searched first before creating a new record #40
{
task?: {
id: string,
isCompleted?: boolean
projectId?: string
},
project?: {
title: string
}
session: {
startTimestamp: Date,
duration: number,
note?: string
type: "session" | "break" | "long-break",
retroAdded?: boolean
}
}
{
session: {
id: string
taskId: string,
startTimestamp: Date,
duration: Date,
note?: string,
type: "session" | "break" | "long-break",
edited: boolean,
retroAdded: boolean,
lastUpdated: Date
},
// Only if new task is created
task?: {
id: string,
title?: string,
projectId: string,
isCompleted: boolean,
lastUpdated: Date
},
// Only if new project is created
project?: {
id: string,
title?: string,
isArchived: boolean,
lastUpdated: Date
}
}
Used primarily by edit session workflow. Creates a projects and/or task as needed (if title is provided instead of id).
{
task?: {
id: string,
isCompleted?: boolean
projectId?: string
},
project?: {
title: string
}
session: {
startTimestamp: Date,
duration: number,
note?: string
type: "session" | "break" | "long-break",
retroAdded?: boolean
}
}
{
session: {
id: string
taskId: string,
startTimestamp: Date,
duration: Date,
note?: string,
type: "session" | "break" | "long-break",
edited: boolean,
retroAdded: boolean,
lastUpdated: Date
},
// Only if new task is created
task?: {
id: string,
title?: string,
projectId: string,
isCompleted: boolean,
lastUpdated: Date
},
// Only if new project is created
project?: {
id: string,
title?: string,
isArchived: boolean,
lastUpdated: Date
}
}
Gets the project with the provided id
{
project: {
id: string,
title?: string,
isArchived: boolean,
lastUpdated: Date
}
}
Creates a new project.
{
project: {
title?: string,
isArchived?: boolean
}
}
{
project: {
id: string,
title?: string,
isArchived: boolean,
lastUpdated: Date
}
}
Gets the task with the provided id
{
task: {
id: string,
projectId: string,
title?: string,
isCompleted: boolean,
lastUpdated: Date
}
}
Creates a new task. If a projectId is not provided, it is assigned to the user's default project.
{
task: {
projectId?: string,
title?: string,
isCompleted?: boolean
}
}
{
task: {
id: string,
projectId: string,
title?: string,
isCompleted: boolean,
lastUpdated: Date
}
}