Post

2 followers Follow
0
Avatar

Create Timesheet on Project via REST API

I'm trying to create a Timesheet on behalf of another user using the REST API. I'd like to do it against a project, using the Project Name as the identifier of the project (if possible) and the User email as an identifier for the user.

I'm struggling to workout the correct entity string to pass via the REST API and each combination of what I try passes back an error. I believe it something similar to below:

{ entity: {id: "/Timesheet", duration: "1d", reportedBy:"user@domain.com", reportedDate: "13/14/15", ~workitem~:"Project Name"} }

I've tried to use the documentation but it's not that clear. It would be useful if there was a few more examples available.

Darren Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Chris,
You need to use Entity Ids (e.g. /user/<user external id>) , not names for reportedBy & workitem fields,
You'll find several REST API samples in this forums.
Hope this helps,
Ophir

Ophir Kenig 0 votes
Comment actions Permalink