4 Replies Latest reply on Jan 30, 2018 9:36 AM by gregor

    GetPISnapshotData

    Sunil_Shetty

      Hi Experts,

       

                      I am trying to fetch the equipment Tag run hours from OSIPI WS using the method "GetPISnapshotData".

       

      I would like to know how to fetch run hours for a given date and time.

       

      Request sent from SOAPUI Tool :  (Tag name : PCS.B123456.PV) I tried sending the request as follows and I got error saying wrong syntax.

       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pid="http://xml.osisoft.com/services/PIDataService">

         <soapenv:Header/>

         <soapenv:Body>

            <pid:GetPISnapshotData>

               <!--Optional:-->

               <pid:paths>

                  <!--Zero or more repetitions:-->

                  <pid:string>pi:\\piserverhostname\'PCS.B123456.PV','2018-01-29'</pid:string>

               </pid:paths>

            </pid:GetPISnapshotData>

         </soapenv:Body>

      </soapenv:Envelope>

       

       

      Appreciate your response.

       

      Thanks in Advance.

       

      Cheers,

      Sunil

        • Re: GetPISnapshotData
          jyi

          Hi Sunil,

           

          GetPISnapshotData does not require any time inputs. It only require [] path. Also it seems to me that the tagname is enclosed with ' ', which is not necessary. The whole path should be givien but the ' ' is probably not necessary.

           

          In the C# form, the following could work, which I borrowed from older PI Square post:

          ServiceReference1.PITimeSeriesClient client = new ServiceReference1.PITimeSeriesClient();
          string[] tags = { @"pi:\\pims\sinusoid" };
          ServiceReference1.TimeSeries[] data = client.GetPISnapshotData(tags);
          
          client.Close();
          

           

           

          Best,

          JIn