SOLVED

ReST API Task Duration field contains unknown unit t

%3CLINGO-SUB%20id%3D%22lingo-sub-2651107%22%20slang%3D%22en-US%22%3EReST%20API%20Task%20Duration%20field%20contains%20unknown%20unit%20t%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2651107%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20make%20a%20GET%20request%20for%20fetching%20all%20tasks%20for%20a%20particular%20project.%20But%20the%20task%20Duration%20field%20in%20an%20XML%20response%20I%20received%20contains%20unknown%20unit%20't'%20instead%20of%20'h'%20(hours).%20In%20the%20Project%20Online%2C%20it%20is%20in%20hours.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Duration.png%22%20style%3D%22width%3A%2098px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303495iC3374AE2746B92BB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Duration.png%22%20alt%3D%22Duration.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI'm%20making%20a%20ReST%20API%20request%20through%20a%20C%23%20application.%3C%2FP%3E%3CP%3EPlease%20note%20that%20I've%20also%20tried%20the%20same%20in%20the%20browser%20but%20the%20result%20is%20same.%3C%2FP%3E%3CP%3EDoes%20anyone%20has%20any%20idea%20about%20this%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20%26amp%3B%20Regards%2C%3C%2FP%3E%3CP%3ERohan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2651107%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EProject%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EProject%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

Hello Everyone,

 

I'm trying to make a GET request for fetching all tasks for a particular project. But the task Duration field in an XML response I received contains unknown unit 't' instead of 'h' (hours). In the Project Online, it is in hours. 

Duration.png

 

I'm making a ReST API request through a C# application.

Please note that I've also tried the same in the browser but the result is same.

Does anyone has any idea about this issue?

 

Thanks & Regards,

Rohan

1 Reply
best response confirmed by Dale Howard (MVP)
Solution
Issue has been solved. Machine locale was different. So sent "Accept-Language" http header along with GET request.