This project has moved and is read-only. For the latest updates, please go here.

Data historian web service syntax

Dec 17, 2012 at 12:22 PM


I am getting data nicely with:

But I a get a syntax error when trying to get the data in a specific time interval: 13:00:00/12-17-12 13:01:00/xml    (query syntax inspired from

The error is obviously:

"The server encountered an error processing the request. Please see the service help page for constructing valid requests to the service."

I have also tried URLencoder classes. I have also tried to insert "%20" instead of blank space characters. Both of these with little success.

My kind question is: what does the endcoded URL have to look like ? Or what class should I use on what string to encode my request according to the webservice syntax requirements ?

Thank you!


Dec 17, 2012 at 2:04 PM

Hi Alex,

As the result of a fairly recent change, the call to DateTime.Parse() was modified to use DateTime.ParseExact(). As a result of this, the date and time values entered into the URL must be of the format "MM/dd/yyyy HH:mm:ss.fff". The simple workaround, in your case, is to add ".000" to the end of your date and time values. Note that this is almost certainly incorrect behavior, and we will keep you updated on the status of this bug.


Dec 17, 2012 at 2:51 PM

Hi Stephen,

Thanks for the very prompt reply! I will write the format once more just for an easy reference: "MM/dd/yyyy HH:mm:ss.fff"

I tried (both with clear text and with URL encoding): 13:00:00.000/12-17-12 13:01:00.000/xml => syntax error 13:00:00.000/12-17-2012 13:01:00.000/xml => syntax error 13:00:00.000/12/17/2012 13:01:00.000/xml (which looks so wrong to me)=>Endpoint not found\"12/17/2012 13:00:00.000\"/\"12/17/2012 13:01:00.000\"/xml =>Endpoint not found

Could you copy paste the exact URL (with the host part obfuscated) that worked for you ? It would help me a lot! If there exists no such URL because of the bug you were talking about, I would also be grateful if you could let me know so I don't waste anymore time on this. However, it would help me a lot if there would be a (temporary) URL that gets the query to the service.

Thank you,


Dec 17, 2012 at 3:22 PM

Hi Alex,

Good catch. I had forgotten that the date/time format required by ParseExact had forward slashes and thus could not be used in the web service URL. Unfortunately, it also appears as though URL encoding the forward slashes does not solve the problem, so there is literally no way of accessing the data using absolute date/time values.

I have checked in the fix for this issue, but the changes will not appear in the openPDC until we can release another build of the openPDC v1.5 SP1 Release Candidate. We will let you know when the fix is in place so that you can download it.

Thanks again,

Dec 17, 2012 at 4:22 PM


Ritchie just finished posting the latest build of openPDC v1.5 SP1, and this problem should be fixed there.


Dec 20, 2012 at 11:11 AM
Edited Dec 20, 2012 at 11:25 AM


Thank you! The issue is solved now!



Dec 21, 2012 at 6:27 PM

Using openPDC 1.5 RC - 81886

I am having diffuculty with using the historian service web site.  When I use the URL:

http://localhost:6152/historian/timeseriesdata/read/current/1172/12-21-2012 18:14:54.132/12-21-2012 18:19:54.132/xml

I get 'Endpoint not found'.The same result if I removed the fraction of second.


But using the Historian Viewer, entering the exact same id (1172) and exact same start and end points, I get the expected data. What am I entering incorrectly?

Dec 23, 2012 at 6:31 AM

Hi patpentz,

I was having the same issue, but the latest patch fixed it. Have you tried downloading the latest version from: