Skip to content

Instantly share code, notes, and snippets.

@danswater
Last active October 18, 2016 01:59
Show Gist options
  • Save danswater/6a745882d4d29c2e5312ee7a240c690e to your computer and use it in GitHub Desktop.
Save danswater/6a745882d4d29c2e5312ee7a240c690e to your computer and use it in GitHub Desktop.
Saving widget settings

API:

<request-url>

Query:

chart_type          = pieChart || barGraph
interval            = daily || weekly || monthly
date_range          = "2016-10-12,2016-10-12"
dashboard_widget_id = 1
is_current          = 1 || 2

Response:

	{
		"chart_type" : "pieChart",
		"interval"   : "daily",
		"date_Range" : "2016-10-12,2016-10-12",
		"dashboard_widget_id" : 1
	}
Get Summary Timesheets

API:

<request-url>

Query:

from     = 2016-10-11
to       = 2016-10-11
interval = daily
user_id  = 1

Response:

	{
		"total_hours_submitted": {
			"total_hours_spent": "30.00"
		},
		"total_hours_approved": {
			"total_hours_spent": "0.00"
		},
		"total_hours_rejected": {
			"total_hours_spent": "0.00"
		},
		"total_hours_logged": {
			"total_hours_spent": "30.00"
		}
	}

E.g

/api/<request-url>?from=2016-10-11&to=2016-10-11&interval=daily&user_id=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment