{"_id":"556527157a60a419000627f7","user":"555a5da8bcb32e19006f816f","editedParams2":true,"__v":8,"parentDoc":null,"project":"5548466bd2c8410d006c2143","version":{"_id":"5548466bd2c8410d006c2146","project":"5548466bd2c8410d006c2143","__v":8,"createdAt":"2015-05-05T04:26:19.796Z","releaseDate":"2015-05-05T04:26:19.796Z","categories":["5548466cd2c8410d006c2147","554a69ba0b54d30d007fe128","554a7f3338e3620d0082192e","5565162e03b6710d00916942","55651a0c65a1130d00400c2b","55651d4565a1130d00400c2f","55651e0165a1130d00400c32","5565217903b6710d0091695f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"55651a0c65a1130d00400c2b","pages":["55651a9c03b6710d00916948","55651b27b893840d00444737","55651cb603b6710d0091694c","55651d35b893840d00444740","55652662eb1615230053fd54","556526c1b60f251900703445","556527157a60a419000627f7"],"project":"5548466bd2c8410d006c2143","version":"5548466bd2c8410d006c2146","__v":7,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-27T01:12:44.934Z","from_sync":false,"order":4,"slug":"timesheets","title":"Timesheets"},"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-27T02:08:21.531Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n    \"status\": \"Okay\",\n    \"timesheets\": [\n        {\n            \"adminTypeId\": null,\n            \"date\": \"2015-05-07T00:00:00\",\n            \"hours\": 8.00,\n            \"projectId\": 555069,\n            \"taskId\": 28178219,\n            \"resouceId\": 1608580,\n            \"id\": 14469255,\n            \"name\": null\n        },\n        {\n            \"adminTypeId\": null,\n            \"date\": \"2015-05-07T00:00:00\",\n            \"hours\": 5.00,\n            \"projectId\": 555069,\n            \"taskId\": 28178220,\n            \"resouceId\": 1608580,\n            \"id\": 14469256,\n            \"name\": null\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","examples":{"codes":[{"code":" $.ajax({ \n     type: \"GET\", \n     url: \"/api/v1/resources/\" + resourceId + \"/timesheets.json\", \n     contentType: 'application/json', \n     dataType: \"json\", \n     success: worked,\n     headers: { apiKey: apiKey }\n   });","language":"javascript"},{"code":"<?\n$context = stream_context_create(array(\n  'http'=>array(\n    'method'=>\"GET\",\n    'header'=>\"apiKey: [yourApiKey]\")\n));\n$data = file_get_contents('https://api.projectmanager.com/api/v1/resources/1608580/timesheets.json', false, $context);\nprint_r(json_decode($data));\n?>","language":"php"}]},"method":"get","auth":"required","params":[{"_id":"557f5011e211d20d006014a0","ref":"","in":"path","required":true,"desc":"The Id of the resource you want to retrieve timesheets for.","default":"","type":"int","name":"resourceId"}],"url":"/resources/{resourceId}/timesheets.json"},"isReference":false,"order":2,"body":"A Timesheet record is denoted by the following properties:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"adminTypeId\",\n    \"0-1\": \"The Id of the administrative activity that the time is recorded against.\",\n    \"1-0\": \"date\",\n    \"1-1\": \"The date the Timesheet entry is for.\",\n    \"2-0\": \"hours\",\n    \"2-1\": \"The hours recorded against the admin type or task, for the specified resource for the specified date.\",\n    \"3-0\": \"projectId\",\n    \"3-1\": \"The id of the project that the time has been recorded against.\",\n    \"4-0\": \"taskId\",\n    \"4-1\": \"The id of the task that the time has been recorded against.\",\n    \"5-0\": \"resourceId\",\n    \"5-1\": \"The id of the resource that the time has been recorded for.\",\n    \"6-0\": \"name\",\n    \"6-1\": \"??\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]","excerpt":"A Timesheet instance records the number of hours spent on Tasks and Administrative activities for a particular Resource.\n\nA Timesheet entry is for a particular day, and there can only be one Timesheet record per Resource for a particular task(or admin type) for a specific date.\n\nUse this API to retrieve a list of Timesheet records for a particular Resource.\n\nNOTE: The API instructions use the term \"Resource\" in both the Code and in these Developer instructions to reference Resourceid. However, in the live Product, the term \"Resource\" has been globally changed to \"People\" or \"Person\" to indicate a resource.","slug":"retrieve-timesheets-from-resources","type":"endpoint","title":"Timesheets by Resource"}

getTimesheets by Resource

A Timesheet instance records the number of hours spent on Tasks and Administrative activities for a particular Resource. A Timesheet entry is for a particular day, and there can only be one Timesheet record per Resource for a particular task(or admin type) for a specific date. Use this API to retrieve a list of Timesheet records for a particular Resource. NOTE: The API instructions use the term "Resource" in both the Code and in these Developer instructions to reference Resourceid. However, in the live Product, the term "Resource" has been globally changed to "People" or "Person" to indicate a resource.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

resourceId:
required
integer
The Id of the resource you want to retrieve timesheets for.

Examples


Result Format


Documentation

A Timesheet record is denoted by the following properties: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "adminTypeId", "0-1": "The Id of the administrative activity that the time is recorded against.", "1-0": "date", "1-1": "The date the Timesheet entry is for.", "2-0": "hours", "2-1": "The hours recorded against the admin type or task, for the specified resource for the specified date.", "3-0": "projectId", "3-1": "The id of the project that the time has been recorded against.", "4-0": "taskId", "4-1": "The id of the task that the time has been recorded against.", "5-0": "resourceId", "5-1": "The id of the resource that the time has been recorded for.", "6-0": "name", "6-1": "??" }, "cols": 2, "rows": 7 } [/block]