Not signed in (Sign In)
The Intervals Forum is read-only
Please head to for help articles and guides. If you have any questions, please contact our support team.


GET time - one vs many

Bottom of Page

1 to 4 of 4

    • tsmith339
    • Feb 21st 2014 edited @ 02/21/2014 6:50 am

    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

    "datemodified":"2014-01-28 13:23:14",
    "description":"Out of Office - Travel --sdr",
    "worktype":"General Work"

    And here is the return when requesting multiple times
    "description":"Updated xxxxx Parallel to",
    "datemodified":"2013-06-20 13:32:28",
    "project":"xxxxxx Personnel",
    "worktype":"*Support - Offsite",
    "task":"Upgrade xxxxx Parallel",
    "person":"Tim xxxxx",
    "client":"xxxxxx Personnel",

    The amount of fields that come back when multiple times are returned is much higher.
    Can anybody explain why this is?

    Also, I am working on a C# project serializing/deserializing using DataContractJsonSerializer. I have constructed a time model class based on the second example using DataContract and DataMember attributes.
    My problem is when I request a single time like the first example, it doesn't serialize because of the data contract.

    Is there a better way to go about this? Does another library like Newtonsoft JSON handle this better?

    Thank you!

    I tested out Newtonsoft and it does the trick. If somebody still has the answer as to why the returned objects are different, though, that would be great.


    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.

    Thanks jprado!

Comments are closed.
For more Intervals help documentation, please visit