2021-02-07 13:54:07 +03:00
|
|
|
basePath: /api
|
|
|
|
definitions:
|
2021-08-07 11:16:50 +03:00
|
|
|
models.Diagnostics:
|
|
|
|
properties:
|
|
|
|
architecture:
|
|
|
|
type: string
|
|
|
|
cli_version:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
logs:
|
|
|
|
type: string
|
|
|
|
platform:
|
|
|
|
type: string
|
|
|
|
plugin:
|
|
|
|
type: string
|
|
|
|
stacktrace:
|
|
|
|
type: string
|
|
|
|
type: object
|
2021-02-07 13:54:07 +03:00
|
|
|
models.Heartbeat:
|
|
|
|
properties:
|
|
|
|
branch:
|
|
|
|
type: string
|
|
|
|
category:
|
|
|
|
type: string
|
2021-04-30 11:12:28 +03:00
|
|
|
created_at:
|
|
|
|
description: https://gorm.io/docs/conventions.html#CreatedAt
|
|
|
|
type: number
|
2021-02-07 13:54:07 +03:00
|
|
|
editor:
|
|
|
|
description: ignored because editor might be parsed differently by wakatime
|
|
|
|
type: string
|
|
|
|
entity:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
is_write:
|
|
|
|
type: boolean
|
|
|
|
language:
|
|
|
|
type: string
|
|
|
|
machine:
|
|
|
|
description: ignored because wakatime api doesn't return machines currently
|
|
|
|
type: string
|
|
|
|
operating_system:
|
|
|
|
description: ignored because os might be parsed differently by wakatime
|
|
|
|
type: string
|
|
|
|
project:
|
|
|
|
type: string
|
|
|
|
time:
|
|
|
|
type: number
|
|
|
|
type:
|
|
|
|
type: string
|
2021-10-13 18:47:18 +03:00
|
|
|
user_agent:
|
|
|
|
type: string
|
2021-02-07 13:54:07 +03:00
|
|
|
type: object
|
|
|
|
models.Summary:
|
|
|
|
properties:
|
|
|
|
editors:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
|
|
|
from:
|
|
|
|
example: "2006-01-02 15:04:05.000"
|
|
|
|
format: date
|
|
|
|
type: string
|
2021-06-21 22:53:47 +03:00
|
|
|
labels:
|
2021-08-07 11:16:50 +03:00
|
|
|
description: labels are not persisted, but calculated at runtime, i.e. when
|
|
|
|
summary is retrieved
|
2021-06-21 22:53:47 +03:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
2021-02-07 13:54:07 +03:00
|
|
|
languages:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
|
|
|
machines:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
|
|
|
operating_systems:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
|
|
|
projects:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SummaryItem'
|
|
|
|
type: array
|
|
|
|
to:
|
|
|
|
example: "2006-01-02 15:04:05.000"
|
|
|
|
format: date
|
|
|
|
type: string
|
|
|
|
user_id:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
models.SummaryItem:
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
type: string
|
|
|
|
total:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
v1.AllTimeData:
|
|
|
|
properties:
|
|
|
|
is_up_to_date:
|
|
|
|
description: true if the stats are up to date; when false, a 202 response
|
|
|
|
code is returned and stats will be refreshed soon>
|
|
|
|
type: boolean
|
2021-04-30 11:12:28 +03:00
|
|
|
range:
|
|
|
|
$ref: '#/definitions/v1.AllTimeRange'
|
2021-02-07 13:54:07 +03:00
|
|
|
text:
|
|
|
|
description: total time logged since account created as human readable string>
|
|
|
|
type: string
|
|
|
|
total_seconds:
|
|
|
|
description: total number of seconds logged since account created
|
|
|
|
type: number
|
|
|
|
type: object
|
2021-04-30 11:12:28 +03:00
|
|
|
v1.AllTimeRange:
|
|
|
|
properties:
|
|
|
|
end:
|
|
|
|
type: string
|
|
|
|
end_date:
|
|
|
|
type: string
|
|
|
|
start:
|
|
|
|
type: string
|
|
|
|
start_date:
|
|
|
|
type: string
|
|
|
|
timezone:
|
|
|
|
type: string
|
|
|
|
type: object
|
2021-02-07 13:54:07 +03:00
|
|
|
v1.AllTimeViewModel:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
$ref: '#/definitions/v1.AllTimeData'
|
|
|
|
type: object
|
|
|
|
v1.BadgeData:
|
|
|
|
properties:
|
|
|
|
color:
|
|
|
|
type: string
|
|
|
|
label:
|
|
|
|
type: string
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
schemaVersion:
|
|
|
|
type: integer
|
|
|
|
type: object
|
2021-05-01 14:52:03 +03:00
|
|
|
v1.Project:
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
repository:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
v1.ProjectsViewModel:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.Project'
|
|
|
|
type: array
|
|
|
|
type: object
|
2021-02-07 13:54:07 +03:00
|
|
|
v1.StatsData:
|
|
|
|
properties:
|
|
|
|
daily_average:
|
|
|
|
type: number
|
|
|
|
days_including_holidays:
|
|
|
|
type: integer
|
|
|
|
editors:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
end:
|
|
|
|
type: string
|
|
|
|
languages:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
machines:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
operating_systems:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
projects:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
start:
|
|
|
|
type: string
|
|
|
|
total_seconds:
|
|
|
|
type: number
|
|
|
|
user_id:
|
|
|
|
type: string
|
|
|
|
username:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
v1.StatsViewModel:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
$ref: '#/definitions/v1.StatsData'
|
|
|
|
type: object
|
2021-10-13 18:47:18 +03:00
|
|
|
v1.StatusBarViewModel:
|
|
|
|
properties:
|
|
|
|
cached_at:
|
|
|
|
type: string
|
|
|
|
data:
|
|
|
|
$ref: '#/definitions/v1.SummariesData'
|
|
|
|
type: object
|
2021-02-07 13:54:07 +03:00
|
|
|
v1.SummariesData:
|
|
|
|
properties:
|
|
|
|
categories:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
dependencies:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
editors:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
grand_total:
|
|
|
|
$ref: '#/definitions/v1.SummariesGrandTotal'
|
|
|
|
languages:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
machines:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
operating_systems:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
projects:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesEntry'
|
|
|
|
type: array
|
|
|
|
range:
|
|
|
|
$ref: '#/definitions/v1.SummariesRange'
|
|
|
|
type: object
|
|
|
|
v1.SummariesEntry:
|
|
|
|
properties:
|
|
|
|
digital:
|
|
|
|
type: string
|
|
|
|
hours:
|
|
|
|
type: integer
|
|
|
|
minutes:
|
|
|
|
type: integer
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
percent:
|
|
|
|
type: number
|
|
|
|
seconds:
|
|
|
|
type: integer
|
|
|
|
text:
|
|
|
|
type: string
|
|
|
|
total_seconds:
|
|
|
|
type: number
|
|
|
|
type: object
|
|
|
|
v1.SummariesGrandTotal:
|
|
|
|
properties:
|
|
|
|
digital:
|
|
|
|
type: string
|
|
|
|
hours:
|
|
|
|
type: integer
|
|
|
|
minutes:
|
|
|
|
type: integer
|
|
|
|
text:
|
|
|
|
type: string
|
|
|
|
total_seconds:
|
|
|
|
type: number
|
|
|
|
type: object
|
|
|
|
v1.SummariesRange:
|
|
|
|
properties:
|
|
|
|
date:
|
|
|
|
type: string
|
|
|
|
end:
|
|
|
|
type: string
|
|
|
|
start:
|
|
|
|
type: string
|
|
|
|
text:
|
|
|
|
type: string
|
|
|
|
timezone:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
v1.SummariesViewModel:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/v1.SummariesData'
|
|
|
|
type: array
|
|
|
|
end:
|
|
|
|
type: string
|
|
|
|
start:
|
|
|
|
type: string
|
|
|
|
type: object
|
2021-04-30 11:12:28 +03:00
|
|
|
v1.User:
|
|
|
|
properties:
|
|
|
|
created_at:
|
|
|
|
type: string
|
|
|
|
display_name:
|
|
|
|
type: string
|
|
|
|
email:
|
|
|
|
type: string
|
|
|
|
full_name:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
is_email_confirmed:
|
|
|
|
type: boolean
|
|
|
|
is_email_public:
|
|
|
|
type: boolean
|
|
|
|
last_heartbeat_at:
|
|
|
|
type: string
|
|
|
|
last_plugin_name:
|
|
|
|
type: string
|
|
|
|
last_project:
|
|
|
|
type: string
|
|
|
|
modified_at:
|
|
|
|
type: string
|
|
|
|
timezone:
|
|
|
|
type: string
|
|
|
|
username:
|
|
|
|
type: string
|
|
|
|
website:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
v1.UserViewModel:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
$ref: '#/definitions/v1.User'
|
|
|
|
type: object
|
2021-02-07 13:54:07 +03:00
|
|
|
info:
|
|
|
|
contact:
|
|
|
|
email: ferdinand@muetsch.io
|
|
|
|
name: Ferdinand Mütsch
|
|
|
|
url: https://github.com/muety
|
|
|
|
description: |-
|
|
|
|
REST API to interact with [Wakapi](https://wakapi.dev)
|
|
|
|
|
|
|
|
## Authentication
|
|
|
|
Set header `Authorization` to your API Key encoded as Base64 and prefixed with `Basic`
|
|
|
|
**Example:** `Basic ODY2NDhkNzQtMTljNS00NTJiLWJhMDEtZmIzZWM3MGQ0YzJmCg==`
|
|
|
|
license:
|
|
|
|
name: GPL-3.0
|
|
|
|
url: https://github.com/muety/wakapi/blob/master/LICENSE
|
|
|
|
title: Wakapi API
|
|
|
|
version: "1.0"
|
|
|
|
paths:
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/shields/v1/{user}/{interval}/{filter}:
|
2021-02-07 13:54:07 +03:00
|
|
|
get:
|
|
|
|
description: Retrieve total time for a given entity (e.g. a project) within
|
|
|
|
a given range (e.g. one week) in a format compatible with [Shields.io](https://shields.io/endpoint).
|
|
|
|
Requires public data access to be allowed.
|
|
|
|
operationId: get-badge
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Interval to aggregate data for
|
|
|
|
enum:
|
|
|
|
- today
|
|
|
|
- yesterday
|
|
|
|
- week
|
|
|
|
- month
|
|
|
|
- year
|
|
|
|
- 7_days
|
|
|
|
- last_7_days
|
|
|
|
- 30_days
|
|
|
|
- last_30_days
|
|
|
|
- 12_months
|
|
|
|
- last_12_months
|
|
|
|
- any
|
|
|
|
in: path
|
|
|
|
name: interval
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Filter to apply (e.g. 'project:wakapi' or 'language:Go')
|
|
|
|
in: path
|
|
|
|
name: filter
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.BadgeData'
|
|
|
|
summary: Get badge data
|
|
|
|
tags:
|
|
|
|
- badges
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}:
|
2021-04-30 11:12:28 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/developers#users
|
|
|
|
operationId: get-wakatime-user
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.UserViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve the given user
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/all_time_since_today:
|
2021-02-07 13:54:07 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/developers#all_time_since_today
|
|
|
|
operationId: get-all-time
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.AllTimeViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve summary for all time
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/heartbeats:
|
2021-06-21 22:53:47 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-heartbeat-3
|
|
|
|
parameters:
|
|
|
|
- description: A single heartbeat
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push a new heartbeat
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/heartbeats.bulk:
|
2021-06-21 22:53:47 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
2021-06-22 01:27:46 +03:00
|
|
|
operationId: post-heartbeat-7
|
2021-06-21 22:53:47 +03:00
|
|
|
parameters:
|
|
|
|
- description: Multiple heartbeats
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
type: array
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push new heartbeats
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/projects:
|
2021-05-01 14:52:03 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/developers#projects
|
|
|
|
operationId: get-wakatime-projects
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Query to filter projects by
|
|
|
|
in: query
|
|
|
|
name: q
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.ProjectsViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve and fitler the user's projects
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/stats/{range}:
|
2021-04-30 11:12:28 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/developers#stats
|
|
|
|
operationId: get-wakatimes-tats
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Range interval identifier
|
|
|
|
enum:
|
|
|
|
- today
|
|
|
|
- yesterday
|
|
|
|
- week
|
|
|
|
- month
|
|
|
|
- year
|
|
|
|
- 7_days
|
|
|
|
- last_7_days
|
|
|
|
- 30_days
|
|
|
|
- last_30_days
|
|
|
|
- 12_months
|
|
|
|
- last_12_months
|
|
|
|
- any
|
2021-09-04 21:02:01 +03:00
|
|
|
in: path
|
2021-04-30 11:12:28 +03:00
|
|
|
name: range
|
|
|
|
type: string
|
2021-12-26 21:29:17 +03:00
|
|
|
- description: Project to filter by
|
|
|
|
in: query
|
|
|
|
name: project
|
|
|
|
type: string
|
|
|
|
- description: Language to filter by
|
|
|
|
in: query
|
|
|
|
name: language
|
|
|
|
type: string
|
|
|
|
- description: Editor to filter by
|
|
|
|
in: query
|
|
|
|
name: editor
|
|
|
|
type: string
|
|
|
|
- description: OS to filter by
|
|
|
|
in: query
|
|
|
|
name: operating_system
|
|
|
|
type: string
|
|
|
|
- description: Machine to filter by
|
|
|
|
in: query
|
|
|
|
name: machine
|
|
|
|
type: string
|
|
|
|
- description: Project label to filter by
|
|
|
|
in: query
|
|
|
|
name: label
|
|
|
|
type: string
|
2021-04-30 11:12:28 +03:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.StatsViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve statistics for a given user
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/compat/wakatime/v1/users/{user}/summaries:
|
2021-02-07 13:54:07 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/developers#summaries.
|
|
|
|
operationId: get-wakatime-summaries
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Range interval identifier
|
|
|
|
enum:
|
|
|
|
- today
|
|
|
|
- yesterday
|
|
|
|
- week
|
|
|
|
- month
|
|
|
|
- year
|
|
|
|
- 7_days
|
|
|
|
- last_7_days
|
|
|
|
- 30_days
|
|
|
|
- last_30_days
|
|
|
|
- 12_months
|
|
|
|
- last_12_months
|
|
|
|
- any
|
|
|
|
in: query
|
|
|
|
name: range
|
|
|
|
type: string
|
|
|
|
- description: Start date (e.g. '2021-02-07')
|
|
|
|
in: query
|
|
|
|
name: start
|
|
|
|
type: string
|
|
|
|
- description: End date (e.g. '2021-02-08')
|
|
|
|
in: query
|
|
|
|
name: end
|
|
|
|
type: string
|
2021-12-26 21:29:17 +03:00
|
|
|
- description: Project to filter by
|
|
|
|
in: query
|
|
|
|
name: project
|
|
|
|
type: string
|
|
|
|
- description: Language to filter by
|
|
|
|
in: query
|
|
|
|
name: language
|
|
|
|
type: string
|
|
|
|
- description: Editor to filter by
|
|
|
|
in: query
|
|
|
|
name: editor
|
|
|
|
type: string
|
|
|
|
- description: OS to filter by
|
|
|
|
in: query
|
|
|
|
name: operating_system
|
|
|
|
type: string
|
|
|
|
- description: Machine to filter by
|
|
|
|
in: query
|
|
|
|
name: machine
|
|
|
|
type: string
|
|
|
|
- description: Project label to filter by
|
|
|
|
in: query
|
|
|
|
name: label
|
|
|
|
type: string
|
2021-02-07 13:54:07 +03:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.SummariesViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve WakaTime-compatible summaries
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/health:
|
2021-02-07 13:54:07 +03:00
|
|
|
get:
|
|
|
|
operationId: get-health
|
|
|
|
produces:
|
|
|
|
- text/plain
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Check the application's health status
|
|
|
|
tags:
|
|
|
|
- misc
|
2022-01-02 03:22:58 +03:00
|
|
|
/heartbeat:
|
2021-02-07 13:54:07 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-heartbeat
|
|
|
|
parameters:
|
2021-06-21 22:53:47 +03:00
|
|
|
- description: A single heartbeat
|
2021-02-07 13:54:07 +03:00
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push a new heartbeat
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/heartbeats:
|
2021-06-21 22:53:47 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
2021-06-22 01:27:46 +03:00
|
|
|
operationId: post-heartbeat-5
|
2021-06-21 22:53:47 +03:00
|
|
|
parameters:
|
|
|
|
- description: Multiple heartbeats
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
type: array
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push new heartbeats
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/plugins/errors:
|
2021-08-07 11:16:50 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-diagnostics
|
|
|
|
parameters:
|
|
|
|
- description: A single diagnostics object sent by WakaTime CLI
|
|
|
|
in: body
|
|
|
|
name: diagnostics
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Diagnostics'
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push a new diagnostics object
|
|
|
|
tags:
|
|
|
|
- diagnostics
|
2022-01-02 03:22:58 +03:00
|
|
|
/relay:
|
|
|
|
delete:
|
|
|
|
operationId: relay-delete
|
|
|
|
parameters:
|
|
|
|
- description: Original URL to perform the request to
|
|
|
|
in: header
|
|
|
|
name: X-Target-URL
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"403":
|
|
|
|
description: Returned if request path is not whitelisted
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"502":
|
|
|
|
description: Returned if upstream host is down
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Proxy an DELETE API request to another Wakapi instance
|
|
|
|
tags:
|
|
|
|
- relay
|
|
|
|
get:
|
|
|
|
operationId: relay-get
|
|
|
|
parameters:
|
|
|
|
- description: Original URL to perform the request to
|
|
|
|
in: header
|
|
|
|
name: X-Target-URL
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"403":
|
|
|
|
description: Returned if request path is not whitelisted
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"502":
|
|
|
|
description: Returned if upstream host is down
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Proxy an GET API request to another Wakapi instance
|
|
|
|
tags:
|
|
|
|
- relay
|
|
|
|
patch:
|
|
|
|
operationId: relay-patch
|
|
|
|
parameters:
|
|
|
|
- description: Original URL to perform the request to
|
|
|
|
in: header
|
|
|
|
name: X-Target-URL
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"403":
|
|
|
|
description: Returned if request path is not whitelisted
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"502":
|
|
|
|
description: Returned if upstream host is down
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Proxy an PATCH API request to another Wakapi instance
|
|
|
|
tags:
|
|
|
|
- relay
|
|
|
|
post:
|
|
|
|
operationId: relay-post
|
|
|
|
parameters:
|
|
|
|
- description: Original URL to perform the request to
|
|
|
|
in: header
|
|
|
|
name: X-Target-URL
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"403":
|
|
|
|
description: Returned if request path is not whitelisted
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"502":
|
|
|
|
description: Returned if upstream host is down
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Proxy an POST API request to another Wakapi instance
|
|
|
|
tags:
|
|
|
|
- relay
|
|
|
|
put:
|
|
|
|
operationId: relay-put
|
|
|
|
parameters:
|
|
|
|
- description: Original URL to perform the request to
|
|
|
|
in: header
|
|
|
|
name: X-Target-URL
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"403":
|
|
|
|
description: Returned if request path is not whitelisted
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"502":
|
|
|
|
description: Returned if upstream host is down
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
summary: Proxy an PUT API request to another Wakapi instance
|
|
|
|
tags:
|
|
|
|
- relay
|
|
|
|
/summary:
|
2021-02-07 13:54:07 +03:00
|
|
|
get:
|
|
|
|
operationId: get-summary
|
|
|
|
parameters:
|
|
|
|
- description: Interval identifier
|
|
|
|
enum:
|
|
|
|
- today
|
|
|
|
- yesterday
|
|
|
|
- week
|
|
|
|
- month
|
|
|
|
- year
|
|
|
|
- 7_days
|
|
|
|
- last_7_days
|
|
|
|
- 30_days
|
|
|
|
- last_30_days
|
|
|
|
- 12_months
|
|
|
|
- last_12_months
|
|
|
|
- any
|
|
|
|
in: query
|
|
|
|
name: interval
|
|
|
|
type: string
|
|
|
|
- description: Start date (e.g. '2021-02-07')
|
|
|
|
in: query
|
|
|
|
name: from
|
|
|
|
type: string
|
|
|
|
- description: End date (e.g. '2021-02-08')
|
|
|
|
in: query
|
|
|
|
name: to
|
|
|
|
type: string
|
|
|
|
- description: Whether to recompute the summary from raw heartbeat or use cache
|
|
|
|
in: query
|
|
|
|
name: recompute
|
|
|
|
type: boolean
|
2021-12-26 21:29:17 +03:00
|
|
|
- description: Project to filter by
|
|
|
|
in: query
|
|
|
|
name: project
|
|
|
|
type: string
|
|
|
|
- description: Language to filter by
|
|
|
|
in: query
|
|
|
|
name: language
|
|
|
|
type: string
|
|
|
|
- description: Editor to filter by
|
|
|
|
in: query
|
|
|
|
name: editor
|
|
|
|
type: string
|
|
|
|
- description: OS to filter by
|
|
|
|
in: query
|
|
|
|
name: operating_system
|
|
|
|
type: string
|
|
|
|
- description: Machine to filter by
|
|
|
|
in: query
|
|
|
|
name: machine
|
|
|
|
type: string
|
|
|
|
- description: Project label to filter by
|
|
|
|
in: query
|
|
|
|
name: label
|
|
|
|
type: string
|
2021-02-07 13:54:07 +03:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Summary'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve a summary
|
|
|
|
tags:
|
|
|
|
- summary
|
2022-01-02 03:22:58 +03:00
|
|
|
/users/{user}/heartbeats:
|
2021-06-22 01:27:46 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-heartbeat-4
|
|
|
|
parameters:
|
|
|
|
- description: A single heartbeat
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push a new heartbeat
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/users/{user}/heartbeats.bulk:
|
2021-06-22 01:27:46 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-heartbeat-8
|
|
|
|
parameters:
|
|
|
|
- description: Multiple heartbeats
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
type: array
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push new heartbeats
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/users/{user}/statusbar/today:
|
2021-10-13 18:47:18 +03:00
|
|
|
get:
|
|
|
|
description: Mimics https://wakatime.com/api/v1/users/current/statusbar/today.
|
|
|
|
Have no official documentation
|
|
|
|
operationId: statusbar
|
|
|
|
parameters:
|
|
|
|
- description: User ID to fetch data for (or 'current')
|
|
|
|
in: path
|
|
|
|
name: user
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/v1.StatusBarViewModel'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Retrieve summary for statusbar
|
|
|
|
tags:
|
|
|
|
- wakatime
|
2022-01-02 03:22:58 +03:00
|
|
|
/v1/users/{user}/heartbeats:
|
2021-06-21 22:53:47 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
operationId: post-heartbeat-2
|
|
|
|
parameters:
|
|
|
|
- description: A single heartbeat
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push a new heartbeat
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2022-01-02 03:22:58 +03:00
|
|
|
/v1/users/{user}/heartbeats.bulk:
|
2021-06-21 22:53:47 +03:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
2021-06-22 01:27:46 +03:00
|
|
|
operationId: post-heartbeat-6
|
2021-06-21 22:53:47 +03:00
|
|
|
parameters:
|
|
|
|
- description: Multiple heartbeats
|
|
|
|
in: body
|
|
|
|
name: heartbeat
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.Heartbeat'
|
|
|
|
type: array
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: ""
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Push new heartbeats
|
|
|
|
tags:
|
|
|
|
- heartbeat
|
2021-02-07 13:54:07 +03:00
|
|
|
securityDefinitions:
|
|
|
|
ApiKeyAuth:
|
|
|
|
in: header
|
|
|
|
name: Authorization
|
|
|
|
type: apiKey
|
|
|
|
swagger: "2.0"
|