Hi all,
I have found that when I get a single time ("/time/22123734/") vs getting all the time for a person ("/time/?personid=128649") the returned object is different. I am trying to find out why, and secondly, how to handle this in C#.
Here are examples
Returning a single time
{
"personid":128649,
"status":"OK",
"code":200,
"time":{
"id":"22123734",
"projectid":"71347",
"moduleid":"81795",
"taskid":null,
"worktypeid":"129310",
"personid":"99233",
"date":"2014-03-18",
"datemodified":"2014-01-28 13:23:14",
"time":"8",
"description":"Out of Office - Travel --sdr",
"billable":"f",
"worktype":"General Work"
}
}
{
"personid":128649,
"status":"OK",
"code":200,
"listcount":1338,
"time":[
{
"id":"xxxxx",
"projectid":"xxxxx",
"moduleid":"xxxxx",
"taskid":"xxxxx",
"worktypeid":"xxxxx",
"personid":"xxxxx",
"date":"06\/20\/2013",
"time":"0.25",
"description":"Updated xxxxx Parallel to 12.2.0.16",
"billable":"f",
"datemodified":"2013-06-20 13:32:28",
"dateiso":"2013-06-20",
"module":"Setup",
"project":"xxxxxx Personnel",
"worktype":"*Support - Offsite",
"tasklocalid":"34673",
"task":"Upgrade xxxxx Parallel",
"firstname":"Tim",
"lastname":"xxxxx",
"active":"t",
"person":"Tim xxxxx",
"clientid":"xxxxx",
"client":"xxxxxx Personnel",
"clientactive":"f",
"statusid":"1"
},
{......}]
}
tsmith,
The list query returns more fields if you need to build a custom view of the time. This way project names for example are included and you don't need to do an extra query to look up its name from the projectid.
I believe the error is because the API is rejecting some fields from a POST request. This is by design, because those extra fields are read-only. When submitting a POST request just make sure only the read-write fields are submitted. You can get these by viewing the Member section of the time resource.
1 to 4 of 4
Comments are closed.
For more Intervals help documentation, please visit help.myintervals.com