Skip to main content

Statistics API

Content​

Statistics:

Statistics

Cost benefit ratio​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting--
Filtersfrom: date, to: date
Embedded-
GET /api/v0/statistics/cost-benefit-ratio HTTP/1.1
Content-Type: application/json

{
"from": "2023-05-01",
"to": "2023-05-31"
}

Response​

200 OK​

GET /api/v0/statistics/cost-benefit-ratio HTTP/1.1
Content-Type: application/json

{
"costs": 1018797.72,
"benefits": 0,
"profit": -1018797.72,
"costs_percentage": 100,
"benefits_percentage": 0,
"profit_percentage": -100
}

User worked minutes​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting-
Filtersfrom:date, to:date, is_active:bool
Embedded-
GET /api/v0/statistics/users/worked-minutes HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/statistics/users/worked-minutes HTTP/1.1
Content-Type: application/json

{
"items": {
"2": 0,
"3": 0,
"4": 19499,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0,
"10": 42202,
"11": 33772,
"12": 0,
"13": 35609,
"14": 0,
"15": 14710,
"16": 20575,
"17": 0,
"18": 50,
"19": 41425,
"20": 41669,
"21": 0,
"22": 0,
"23": 0,
"24": 11764,
"25": 0,
"26": 5970,
"27": 0,
"28": 0,
"29": 13390,
"30": 0,
"31": 45076,
"32": 0,
"33": 240,
"34": 0,
"35": 27141,
"36": 25364,
"37": 1165,
"38": 0,
"39": 8188,
"1": 2780
}
}

User costs​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting-
Filtersfrom:date, to:date, is_active:bool
Embedded-
GET /api/v0/statistics/users/costs HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/statistics/users/costs HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 1,
"costs": 0,
"worked_minutes": 1355,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 2,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 3,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 4,
"costs": 0,
"worked_minutes": 2538,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 5,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 6,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 7,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 8,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 9,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 10,
"costs": 0,
"worked_minutes": 11132,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 11,
"costs": 15966.66666655,
"worked_minutes": 9580,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 12,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 13,
"costs": 0,
"worked_minutes": 8577,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 14,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 15,
"costs": 0,
"worked_minutes": 4035,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 16,
"costs": 0,
"worked_minutes": 5764,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 17,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 18,
"costs": 0,
"worked_minutes": 50,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 19,
"costs": 0,
"worked_minutes": 10387,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 20,
"costs": 0,
"worked_minutes": 9650,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 21,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 22,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 23,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 24,
"costs": 0,
"worked_minutes": 2631,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 25,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 26,
"costs": 0,
"worked_minutes": 495,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 27,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 28,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 29,
"costs": 0,
"worked_minutes": 1430,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 30,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 31,
"costs": 0,
"worked_minutes": 10810,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 32,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 33,
"costs": 0,
"worked_minutes": 240,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 34,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 35,
"costs": 0,
"worked_minutes": 2433,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 36,
"costs": 0,
"worked_minutes": 6289,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 37,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 38,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
},
{
"id": 39,
"costs": 0,
"worked_minutes": 0,
"vacation_days_left": 20,
"vacation_days_used": 1,
"remaining_not_reported_minutes": 150
}
]
}

Cashflow costs​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting--
Filtersfrom: date, to: date
Embedded-
GET /api/v0/statistics/cashflow/costs HTTP/1.1
Content-Type: application/json

{
"from": "2023-05-01",
"to": "2023-05-31"
}

Response​

200 OK​

GET /api/v0/statistics/cashflow/costs HTTP/1.1
Content-Type: application/json

{
"user_costs": [
{
"id": 1,
"costs": 0,
"worked_minutes": 2780
},
{
"id": 2,
"costs": 0,
"worked_minutes": 0
},
{
"id": 3,
"costs": 0,
"worked_minutes": 0
},
{
"id": 4,
"costs": 0,
"worked_minutes": 19499
},
{
"id": 5,
"costs": 0,
"worked_minutes": 0
},
{
"id": 6,
"costs": 0,
"worked_minutes": 0
},
{
"id": 7,
"costs": 0,
"worked_minutes": 0
},
{
"id": 8,
"costs": 0,
"worked_minutes": 0
},
{
"id": 9,
"costs": 0,
"worked_minutes": 0
},
{
"id": 10,
"costs": 0,
"worked_minutes": 42202
},
{
"id": 11,
"costs": 112573.33333277,
"worked_minutes": 33772
},
{
"id": 12,
"costs": 0,
"worked_minutes": 0
},
{
"id": 13,
"costs": 0,
"worked_minutes": 35609
},
{
"id": 14,
"costs": 0,
"worked_minutes": 0
},
{
"id": 15,
"costs": 0,
"worked_minutes": 14710
},
{
"id": 16,
"costs": 0,
"worked_minutes": 20575
},
{
"id": 17,
"costs": 0,
"worked_minutes": 0
},
{
"id": 18,
"costs": 0,
"worked_minutes": 50
},
{
"id": 19,
"costs": 0,
"worked_minutes": 41425
},
{
"id": 20,
"costs": 0,
"worked_minutes": 41669
},
{
"id": 21,
"costs": 0,
"worked_minutes": 0
},
{
"id": 22,
"costs": 0,
"worked_minutes": 0
},
{
"id": 23,
"costs": 0,
"worked_minutes": 0
},
{
"id": 24,
"costs": 0,
"worked_minutes": 11764
},
{
"id": 25,
"costs": 0,
"worked_minutes": 0
},
{
"id": 26,
"costs": 0,
"worked_minutes": 5970
},
{
"id": 27,
"costs": 0,
"worked_minutes": 0
},
{
"id": 28,
"costs": 0,
"worked_minutes": 0
},
{
"id": 29,
"costs": 0,
"worked_minutes": 13390
},
{
"id": 30,
"costs": 0,
"worked_minutes": 0
},
{
"id": 31,
"costs": 0,
"worked_minutes": 45076
},
{
"id": 32,
"costs": 0,
"worked_minutes": 0
},
{
"id": 33,
"costs": 0,
"worked_minutes": 240
},
{
"id": 34,
"costs": 0,
"worked_minutes": 0
},
{
"id": 35,
"costs": 0,
"worked_minutes": 27141
},
{
"id": 36,
"costs": 0,
"worked_minutes": 25364
},
{
"id": 37,
"costs": 0,
"worked_minutes": 1165
},
{
"id": 38,
"costs": 0,
"worked_minutes": 0
},
{
"id": 39,
"costs": 0,
"worked_minutes": 8188
}
],
"fixed_costs": [
{
"name": "Graphic work",
"price": 39130
},
{
"name": "Delivery [km]",
"price": 0
},
{
"name": "Print (w/o VAT)",
"price": 272414.15
}
]
}

Cashflow revenues​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting--
Filtersfrom: date, to: date
Embedded-
GET /api/v0/statistics/cashflow/revenues HTTP/1.1
Content-Type: application/json

{
"from": "2023-05-01",
"to": "2023-05-31"
}

Response​

200 OK​

GET /api/v0/statistics/cashflow/revenues HTTP/1.1
Content-Type: application/json

{
"items": [
{
"invoice_number": 202301001,
"date": "2023-05-04T10:19:08.000000Z",
"price_without_vat": 1995
}
]
}

User estimated and reported time​

Request​

Index behaviourDefinition
Paginated by defaultNo
Sorting--
Filtersfrom: date, to: date, is_active: bool/null
Embedded-
GET /api/v0/statistics/users/estimated-reported-time HTTP/1.1
Content-Type: application/json

{
"from": "2023-05-01",
"to": "2023-05-31",
"is_active": null
}

Response​

Reported and estimated time is in minutes.

200 OK​

GET /api/v0/statistics/users/estimated-reported-time HTTP/1.1
Content-Type: application/json

{
"items": {
"20": {
"user_id": 20,
"user_group_id": 3,
"estimated_time": 9688,
"reported_time": 45239
},
"13": {
"user_id": 13,
"user_group_id": 3,
"estimated_time": 2122.93,
"reported_time": 31876
},
"10": {
"user_id": 10,
"user_group_id": 3,
"estimated_time": 20914.55,
"reported_time": 45453
},
"31": {
"user_id": 31,
"user_group_id": 4,
"estimated_time": 14728.96,
"reported_time": 49764
},
"16": {
"user_id": 16,
"user_group_id": 4,
"estimated_time": 660,
"reported_time": 24529
},
"19": {
"user_id": 19,
"user_group_id": 3,
"estimated_time": 14804.3,
"reported_time": 44643
},
"36": {
"user_id": 36,
"user_group_id": 4,
"estimated_time": 6511.04,
"reported_time": 24064
},
"4": {
"user_id": 4,
"user_group_id": 3,
"estimated_time": 1567.43,
"reported_time": 23554
},
"24": {
"user_id": 24,
"user_group_id": 3,
"estimated_time": 3352.57,
"reported_time": 13378
},
"26": {
"user_id": 26,
"user_group_id": 1,
"estimated_time": 0,
"reported_time": 8950
},
"15": {
"user_id": 15,
"user_group_id": 4,
"estimated_time": 0,
"reported_time": 14919
},
"35": {
"user_id": 35,
"user_group_id": 4,
"estimated_time": 300,
"reported_time": 30647
},
"11": {
"user_id": 11,
"user_group_id": 3,
"estimated_time": 5269.71,
"reported_time": 37400
},
"39": {
"user_id": 39,
"user_group_id": 3,
"estimated_time": 2370.5,
"reported_time": 17934
},
"29": {
"user_id": 29,
"user_group_id": 1,
"estimated_time": 0,
"reported_time": 24890
},
"1": {
"user_id": 1,
"user_group_id": 1,
"estimated_time": 0,
"reported_time": 1620
},
"37": {
"user_id": 37,
"user_group_id": 1,
"estimated_time": 0,
"reported_time": 1775
}
}
}

User busyness​

Request​

Index behaviourDefinition
Paginated by defaultYes
Sorting--
Filters--
Embedded--
GET /api/v0/statistics/busyness HTTP/1.1
Content-Type: application/json

Response​

Returns array of users with amount of waiting tasks and expected work time. If user is not part of group BE or FE, expected_work_time is null.

It also returns an array tasks. In this array value total_reported_time represents total time reported by users in user's group (BE/FE). Value user_reported_time represents total time reported by user and value estimates represents total value of estimates for given group (BE/FE) in minutes. These values are also null if user is not part of any group.

In array tasks is also value task which represents model Task. Similarly status represents task status and project represents Project Task is part of.

200 OK​

GET /api/v0/statistics/users/estimated-reported-time HTTP/1.1
Content-Type: application/json

{
"items": [
{
"user": {
"id": 1,
"first_name": "Aleš",
"last_name": "Bžatek",
"email": "bzatek@simplo.cz",
"is_active": true,
"phone": "",
"address": null,
"birth_date": null,
"note": null,
"minimal_monthly_report_minutes": 8400,
"vacation_days": 0,
"user_group_id": 3,
"github_email": null,
"google_refresh_token_set": false,
"google_calendar_id": null,
"created_at": "2023-02-09T16:18:44+0100"
},
"amount_of_waiting_tasks": 2,
"expected_work_time": 900,
"tasks": [
{
"total_reported_time": 180,
"user_reported_time": 120,
"estimates": 600,
"task": {
"id": 7204,
"name": "Eight task",
"project_id": 166,
"goodday_id": "QmgYeY",
"parent_id": null,
"status_id": 8,
"description": null,
"created_by_user_id": 39,
"assigned_to_user_id": 1,
"action_required_by_user_id": 1,
"start_date": null,
"end_date": null,
"deadline_date": null,
"billable": true,
"priority": 5,
"estimate": 0,
"progress": null,
"costs": 360,
"billings": {
"to_invoice": 0,
"invoiced": 0,
"billings": 0
},
"profit": {
"in_money": -360,
"in_percentage": -100
},
"work_time": {
"reported_time": 180,
"estimated_time": 0,
"progress": 0,
"user_groups": [
{
"users": [
{
"user_id": 1,
"time": 120
},
{
"user_id": 39,
"time": 60
}
],
"user_group_id": 3,
"percentage": 100,
"reported_time": 180
}
]
},
"closed_at": null,
"goodday_created_at": "2023-12-14T13:35:37+0100",
"is_done": false,
"last_activity": "2024-04-16T08:06:28.000000Z",
"created_at": "2024-04-16T10:06:28+0200",
"updated_at": "2024-04-16T10:06:28+0200"
},
"status": {
"id": 8,
"name": "TODO",
"background_color": "#FFFFFF",
"font_color": "#000000",
"is_default": false,
"status_order": null,
"created_at": "2023-02-09T16:20:53+0100",
"updated_at": "2023-02-09T16:20:53+0100"
},
"project": {
"id": 166,
"name": "Martin",
"goodday_id": "DDgFki",
"parent_id": null,
"client_id": 61,
"status_id": 32,
"status_comment": null,
"responsible_user_id": 39,
"active": true,
"description": "Use project to organize work items with a common goal.",
"start_date": null,
"end_date": null,
"priority": 5,
"progress": null,
"type": null,
"is_client": true,
"google_drive_url": null,
"billable": true,
"billing_type": null,
"billing_time_type": null,
"billings_frequency": "1",
"automatically_create_report": false,
"estimated_price": 0,
"goodday_created_at": "2023-12-13T09:40:34+0100",
"has_signed_sla": false,
"require_deadline": false,
"require_estimates": false,
"billable_statuses": [],
"created_at": "2024-04-16T10:06:28+0200",
"updated_at": "2024-05-22T12:24:36+0200"
}
},
]
}
]
}