WebAccess Web Services User Manual Version: 1.0.4 Author:WebAccess Team Advantech Co., Ltd Contents CONTENTS ...................................................................................................................................2 1. OVERVIEW ...........................................................................................................................5 2. LOGIN ...................................................................................................................................6 2.1 LOGON .................................................................................................................................6 2.2 SERVER TIME .........................................................................................................................7 2.3 GETUSERINFO ........................................................................................................................8 2.4 GETVERSION ........................................................................................................................10 2.5 GETCLIENTLIMIT ...................................................................................................................10 3. PROJECT .............................................................................................................................12 3.1 PROJECTLIST ........................................................................................................................12 3.2 PROJECTDETAIL ....................................................................................................................13 4. SCADA NODE .....................................................................................................................15 4.1 NODELIST............................................................................................................................15 4.2 NODEDETAIL........................................................................................................................16 5. PORT ..................................................................................................................................18 5.1 PORTLIST ............................................................................................................................18 5.2 PORTDETAIL ........................................................................................................................19 6. DEVICE................................................................................................................................21 6.1 DEVICELIST ..........................................................................................................................21 6.2 DEVICEDETAIL ......................................................................................................................22 7. TAG.....................................................................................................................................24 7.1 TAGLIST ..............................................................................................................................24 7.1.1 All Tag list of Project Node .......................................................................................24 7.1.2 All Tag list of SCADA node in the Project .................................................................26 7.1.3 All Tag list of the Comport ........................................................................................27 7.1.4 All Tag list of the Device ...........................................................................................27 7.2 TAGDETAIL ..........................................................................................................................28 7.2.1 Tag Detail Information under Project Node .............................................................28 7.2.2 Tag Detail Information of SCADA Node....................................................................33 8. BLOCK.................................................................................................................................35 8.1 BLOCKLIST ...........................................................................................................................35 8.1.1 All Block list in Project Node.....................................................................................35 8.1.2 All Block list in SCADA Node .....................................................................................37 8.1.3 All Block list in Comport ...........................................................................................37 8.1.4 All Block list of Device ...............................................................................................38 8.2 BLOCKDETAIL .......................................................................................................................38 8.2.1 Block detail information in Project Node .................................................................38 8.2.2 Block detail information in SCADA Node of Project Node .......................................39 9. TAG VALUE.........................................................................................................................40 9.1 GETTAGVALUE .....................................................................................................................40 9.1.1 Get Tag Value in Project Node .................................................................................40 9.2 GETTAGVALUETEXT ..............................................................................................................41 9.2.1 Get Text Tag Value in Project Node .........................................................................41 9.3 SETTAGVALUE......................................................................................................................43 9.3.1 Set Tag Value in Project Node ..................................................................................43 9.4 SETTAGVALUETEXT ...............................................................................................................44 9.4.1 Set Text Tag Value ....................................................................................................44 9.5 SUBSCRIBEREALTIMETAG .......................................................................................................45 9.6 UNSUBSCRIBEREALTIMETAG ..................................................................................................46 9.7 GETREALTIMETAGVALUE .......................................................................................................46 10. STATION STATUS ...............................................................................................................49 10.1 GETCOMPORTSTATUS .........................................................................................................49 10.2 GETDEVICESTATUS..............................................................................................................50 10.3 GETSTATIONSTATUS............................................................................................................50 10.4 SETCOMPORTSTATUS ..........................................................................................................52 10.5 SETDEVICESTATUS ..............................................................................................................52 11. DATA LOG ..........................................................................................................................54 11.1 GETDATALOG ....................................................................................................................54 12. ALARM ...............................................................................................................................57 12.1 GETALARMSUMMARYCOUNT ...............................................................................................57 12.2 GETALARMSUMMARY .........................................................................................................57 12.3 GETALARMLOGCOUNT ........................................................................................................59 12.4 GETALARMLOGINDEX ..........................................................................................................59 12.5 GETALARMLOG ..................................................................................................................60 12.6 ALARMACK........................................................................................................................61 12.7 ALARMACKALL ...................................................................................................................62 13. ACTION...............................................................................................................................64 13.1 GETACTIONLOGCOUNT........................................................................................................64 13.2 GETACTIONLOGINDEX .........................................................................................................64 13.3 GETACTIONLOG .................................................................................................................65 1. Overview WebAccess Web Services provide two formats XML and JSON JSON:Insert “JSON” string into URL. For example, http://localhost/WaWebService/JSON/Login XML:No word before URL. For example, http://localhost/WaWebService/Login Request Headers: 1. XML:Content-Type: application/xml; charset=utf-8 2. JSON:Content-Type: application/json; charset=utf-8 For using Basic Authentication, Username and Passwd need use Basic64 encryption into Request Header For example: User Name : admin Password : admin Encrypt admin:admin by Basic64 get YWRtaW46YWRtaW4= Add the line in Request header Authorization: Basic YWRtaW46YWRtaW4= 2. Login 2.1 Logon User must need login before using Web Service. Project list will be returned after login success. HTTP method: GET XML URL: http://localhost/WaWebService/Logon JSON URL: http://localhost/WaWebService/Json/Logon XML Response: <ProjectList> <Result> <Ret>0</Ret> <Total>2</Total> </Result> <Projects> <Project> <ID>1</ID> <Name>Express</Name> <Description>Project Description</Description> </Project> <Project> <ID>2</ID> <Name>WaScada</Name> <Description>Project Description</Description> </Project> </Projects> </ProjectList> JSON Response: { "Result":{ "Ret":0, "Total":2 }, "Projects":[{ "ID":1, "Name":" Express", "Description":"Project Description" }, { "ID":2, "Name":"WaScada", "Description":"Project Description" }] } Response Field: Field Name Description ID Project ID Name Project name Description Project Description 2.2 Server Time Get the Server Time. Return the date, time, and time difference with Server HTTP method: GET XML URL: http://localhost/WaWebService/ServerTime JSON URL: http://localhost/WaWebService/Json/ServerTime XML Response: <ServerTime> <Date>2014/01/01</Date> <Time>10:00:00</Time> <Offset>08:00:00</Offset> </ServerTime> JSON Response: { "Date":"2014\/01\/01", "Time":"10:00:00", "Offset":" 08:00:00" } Response Field: Field Name Description Date Server Date Time Server Time Offset Server Time Difference 2.3 GetUserInfo Get detail information of current login user in Project. HTTP method: GET XML URL: http://localhost/WaWebService/GetUserInfo/{ProjectName} JSON URL: http://localhost/WaWebService/JSON/GetUserInfo/{ProjectName} XML Response: <GetUserInfo> <Result> <Ret>0</Ret> </Result> <UserInfo> <ProjIdbw>0</ProjIdbw> <UserId>48</UserId> <UserName>admin</UserName> <Description>administrator</Description> <Area> <int>127</int> <int>127</int> <int>127</int> <int>127</int> <int>127</int> <int>127</int> . . . <int>127</int> <int>127</int> <int>127</int> <int>127</int> </Area> <UserGraphics> <UserGraphic> <UserId>48</UserId> <GraphicNode>5</GraphicNode> <GraphicName>Page1.bgr</GraphicName> </UserGraphic> <UserGraphic> <UserId>48</UserId> <GraphicNode>5</GraphicNode> <GraphicName>Page2.bgr</GraphicName> </UserGraphic> </UserGraphics> <UserNodes> <UserNode> <NodeIdbw>5</NodeIdbw> <UserId>48</UserId> </UserNode> </UserNodes> </UserInfo> </GetUserInfo> JSON Response: { "Result":{ "Ret":0 }, "UserInfo":{ "ProjIdbw":0, "UserId":48, "UserName":"admin", "Description":"Administrator", "Area":[127,127,127,127,. . . . .,127,127,127,127], "UserGraphics":[{ "UserId":48, "GraphicNode":5, "GraphicName":"Page1.bgr" }], "UserNodes":[{ "UserId":48, "NodeIdbw":5 }] } } Response Field: Field Name Description ProjIdbw Project ID UserId User ID UserName Administrator Name Description Description Area Area UserGraphics Graphics Access UserNodes Field Name Description UserId User ID GraphicNode SCADA Node GraphicName Default Graphic Node Access Field Name Description UserId User ID NodeIdbw Node ID 2.4 GetVersion Get the highest version of SCADA Nodes that belong to current login project. HTTP Method: GET XML Url: http://localhost/WaWebService/GetVersion/{ProjectName} JSON Url: http://localhost/WaWebService/JSON/GetVersion/{ProjectName} XML Response: <WaVersion> <Result> <Ret>0</Ret> </Result> <Version>8.0</Version> </WaVersion> JSON Response: { "Result":{ "Ret":0 }, "Version":"8.0" } Response Field: Field Name Description Version highest version of SCADA Nodes that belong to {ProjectName} 2.5 GetClientLimit Get number of Client limitation HTTP Method: GET XML Url: http://localhost/WaWebService/GetClientLimit/{ProjectName} JSON Url: http://localhost/WaWebService/JSON/ GetClientLimit /{ProjectName} XML Response: <ClientLimit> <LimitCount>1024</LimitCount> </ClientLimit> JSON Response: { "LimitCount":1024 } 3. Project 3.1 ProjectList List all Projects in Project node. HTTP method: GET XML URL: http://localhost/WaWebService/ProjectList JSON URL: http://localhost/WaWebService/JSON/ProjectList XML Response: <ProjectList> <Result> <Ret>0</Ret> <Total>2</Total> </Result> <Projects> <Project> <ID>3</ID> <Name>Express</Name> <Description>Express Project</Description> </Project> <Project> <ID>2</ID> <Name>WaScada</Name> <Description>WaScada Project</Description> </Project> </Projects> </ProjectList> JSON Response: { "Result":{ "Ret":0, "Total":2 }, "Projects":[{ "ID":3, "Name":"Express", "Description":"Express Project" }, { "ID":2, "Name":"WaScada", "Description":"WaScada Project" }] } Response Field: Field Name Description ID Project ID Name Project Name Description Project Description 3.2 ProjectDetail List Project detail information. HTTP method: GET XML URL: http://localhost/WaWebService/ProjectDetail/{ProjectName} JSON URL: http://localhost/WaWebService/JSON/ProjectDetail/{ProjectName} XML Response: <ProjectDetail> <Result> <Ret>0</Ret> </Result> <Project> <ID>3</ID> <Name>Express</Name> <Description>Express Project</Description> <IP>172.18.3.101</IP> <Port>0</Port> <TimeOut>0</TimeOut> <AccessSecurityCode> </AccessSecurityCode> <HTTPPort>0</HTTPPort> </Project> </ProjectDetail> JSON Response: { "Result":{ "Ret":0 }, "Project":{ "ID":3, "Name":"Express", "Description":"Express Project", "IP":"172.18.3.101", "Port":0, "TimeOut":0, "AccessSecurityCode":"", "HTTPPort":0 } } Response Field: Field Name Description ID Project ID Name Project Name Description Project Description IP Project Node IP address Port Main TCP Port in Project Node Timeout Time Out AccessSecurityCode Remote Access Security Code HTTPPort Project Node HTTP Port 4. SCADA Node 4.1 NodeList List all SCADA Node in a Project. HTTP method: GET XML URL: http://localhost/WaWebService/NodeList/{ProjectName} JSON URL: http://localhost/WaWebService/JSON/NodeList/{ProjectName} XML Response: <NodeList> <Result> <Ret>0</Ret> <Total>1</Total> </Result> <Nodes> <Node> <NodeName>SCADA</NodeName> <Description>Node Description</Description> </Node> </Nodes> </NodeList> JSON Response: { "Result":{ "Ret":0, "Total":1 }, "Nodes":[{ "NodeName":"SCADA", "Description":"Node Description" }] } Response Field: Field Name Description NodeName Node Name Description Node Description 4.2 NodeDetail List the detail information of SCADA Node. HTTP method: GET XML URL: http://localhost/WaWebService/NodeDetail/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/NodeDetail/{ProjectName}/{NodeName} XML Response: <NodeDetail> <Result> <Ret>0</Ret> </Result> <Node> <ProjectId>3</ProjectId> <NodeId>4</NodeId> <NodeName>SCADA</NodeName> <Description>Node Description</Description> <Address>172.18.3.101</Address> <Port1>0</Port1> <Port2>0</Port2> <Timeout>0</Timeout> </Node> </NodeDetail> JSON Response: { "Result":{ "Ret":0 }, "Node":{ "ProjectId":3, "NodeId":4, "NodeName":"SCADA", "Description":"Node Description", "Address":"172.18.3.101", "Port1":0, "Port2":0, "Timeout":0 } } Response Field: Field Name Description ProjectId Project Id NodeId Node Id NodeName Node Name Address SCADA Node IP address Port1 Primary TCP port Port2 Secondary TCP port Timeout Timeout 5. Port 5.1 PortList List all Port under Project / SCADA node HTTP Method: GET XML URL: http://localhost/WaWebService/PortList/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/PortList/{ProjectName}/{NodeName} XML Response: <PortList> <Result> <Ret>0</Ret> <Total>2</Total> </Result> <Ports> <Port> <InterfaceName>TCPIP</InterfaceName> <PortNumber>2</PortNumber> <Description>TCP Port</Description> </Port> <Port> <InterfaceName>TCPIP</InterfaceName> <PortNumber>1</PortNumber> <Description>Port Description</Description> </Port> </Ports> </PortList> JSON Response: { "Result":{ "Ret":0, "Total":2 }, "Ports":[{ "InterfaceName":"TCP", "PortNumber":2, "Description":"TCP PORT" }, { "InterfaceName":"TCP", "PortNumber":1, "Description":" Port Description" }] } Response Field: Field Name Description InterfaceName Interface Name PortNumber Port Number Description Description 5.2 PortDetail List Port detail information under Project / SCADA Node. HTTP METHOD: GET XML URL: http://localhost/WaWebService/PortDetail/{ProjectName}/{NodeName}/{Comport} Json URL: http://localhost/WaWebService/Json/PortDetail/{ProjectName}/{NodeName}/{Comport} XML Response: <PortDetail> <Result> <Ret>0</Ret> </Result> <Port> <InterfaceName>TCPIP</InterfaceName> <ComportNbr>2</ComportNbr> <Description>TCP PORT</Description> <BaudRate>9600</BaudRate> <DataBit>8</DataBit> <StopBit>1</StopBit> <Parity>0</Parity> <ScanTime>1000</ScanTime> <TimeOut>1000</TimeOut> <RetryCount>3</RetryCount> <AutoRecoverTime>20</AutoRecoverTime> <OPCServer> </OPCServer> <OPCServerType>0</OPCServerType> </Port> </PortDetail> Json Response: { "Result":{ "Ret":0 }, "Port":{ "InterfaceName":"TCPIP", "ComportNbr":2, "Description":"TCP PORT", "BaudRate":9600, "DataBit":8, "StopBit":1, "Parity":0, "ScanTime":1000, "TimeOut":1000, "RetryCount":3, "AutoRecoverTime":20, "OPCServer":"", "OPCServerType":"0" } } Response Field: Field Name Description InterfaceName Interface Name ComportNbr Comport Number Description Description BaudRate Baud Rate DataBit Data Bit StopBit Stop Bit Parity Parity ScanTime Scan Time TimeOut Timeout RetryCount Retry Count AutoRecoverTime Auto-Recover Time OPCServer OPC Server OPCServerType OPC Server Typr (Local, InProcess, Remote) 6. Device 6.1 DeviceList Get Device list under Comport HTTP METHOD: GET XML URL: http://localhost/WaWebService/DeviceList/{ProjectName}/{NodeName}/{Comport} JSON URL: http://localhost/WaWebService/DeviceList/{ProjectName}/{NodeName}/{Comport} XML Response: <DeviceList> <Result> <Ret>0</Ret> <Total>3</Total> </Result> <Devices> <Device> <DeviceName>ADAM6017_5</DeviceName> <PortNumber>2</PortNumber> <Description>ADAM-6017 8ch AI for Webaccess</Description> <UnitNumber>5</UnitNumber> </Device> <Device> <DeviceName>ADAM6018_6</DeviceName> <PortNumber>2</PortNumber> <Description>ADAM-6018 AI</Description> <UnitNumber>6</UnitNumber> </Device> <Device> <DeviceName>ADAM6050_10</DeviceName> <PortNumber>2</PortNumber> <Description>ADAM 6050 Module</Description> <UnitNumber>10</UnitNumber> </Device> </Devices> </DeviceList> JSON Response: { "Result":{ "Ret":0, "Total":3 }, "Devices":[{ "DeviceName":"ADAM6017_5", "PortNumber":2, "Description":"ADAM-6017 8ch AI for WebAccess", "UnitNumber":5}, { "DeviceName":"ADAM6018_6", "PortNumber":2, "Description":" ADAM-6018 AI ", "UnitNumber":6}, { "DeviceName":"ADAM6050_10", "PortNumber":2, "Description":"ADAM 6050 Module", "UnitNumber":10 }] } Response Field: Field Name Description DeviceName Device Name PortNumber Port Number Description Description UnitNumber Unit Number 6.2 DeviceDetail Get Device detail information. HTTP METHOD: GET XML URL: http://localhost/WaWebService/DeviceDetail/{ProjectName}/{NodeName}/{Comport}/{DeviceName} JSON URL: http://localhost/WaWebService/JSON/DeviceDetail/{ProjectName}/{NodeName}/{Comport}/{DeviceName} XML Response: <DeviceDetail> <Result> <Ret>0</Ret> </Result> <Device> <DeviceName>ADAM6017_5</DeviceName> <PortNumber>2</PortNumber> <Description>ADAM-6017 8ch AI for WebAccess</Description> <UnitNumber>5</UnitNumber> <DeviceType>ADAM6K</DeviceType> <Primary> <IPAddress>172.18.3.237</IPAddress> <PortNumber>502</PortNumber> <DeviceAddress>1</DeviceAddress> </Primary> <Secondary> <IPAddress></IPAddress> <PortNumber></PortNumber> <DeviceAddress></DeviceAddress> </Secondary> </Device> </DeviceDetail> JSON Response: { "Result":{ "Ret":0 }, "Device":{ "DeviceName":"ADAM6017_5", "PortNumber":2, "Description":"ADAM-6017 8ch AI for Webaccess", "UnitNumber":5, "DeviceType":"ADAM6K", "Primary":{ "IPAddress":"172.18.3.237", "PortNumber":"502", "DeviceAddress":"1" }, "Secondary":{ "IPAddress":"", "PortNumber":"", "DeviceAddress":"" } } } Response Field: Field Name Description DeviceName Device Name PortNumber Port Number Description Description UnitNumber Unit Number DeviceType Device Type Primary Primary Secondary Field Name Description IPAddress IP Address PortNumber Port Number DeviceAddress Device Address Secondary Field Name Description IPAddress IP Address PortNumber Port Number DeviceAddress Device Address 7. Tag 7.1 TagList Get Tag list 7.1.1 All Tag list of Project Node Get all Tag list of Project Node HTTP METHOD: GET XML URL: http://localhost/WaWebService/TagList/{ProjName} JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName} XML Response: <TagList> <Result> <Ret>0</Ret> <Total>2</Total> </Result> <Tags> <Tag> <Name>Tag1</Name> <Description>Description1</Description> </Tag> <Tag> <Name>Tag2</Name> <Description>Description2</Description> </Tag> </Tags> </TagList> JSON Response: { "Result":{ "Ret":0, "Total":2 }, "Tags":[{ "Name":"Tag1", "Description":"Description1"}, { "Name":"Tag2", "Description":"Description2" }] } Response Field: Field Name Description ID Tag ID Name Tag Name HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/TagList/{ProjName} JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName} XML Request: <TagList> <Filters> <Filter> <Name>TAGNAME</Name> <Value>Con%</Value> </Filter> <Filter> <Name>ANALOG</Name> <Value>FALSE</Value> </Filter> </Filters> </TagList> JSON Request: { "Filters":[{ "Name":"TAGNAME", "Value":"Con%"}, { "Name":"ANALOG", "Value":"FALSE" }] } Request Parameter: Field Name Description Name Filter Name:TagName, Analog, Discrete, Text, and Block can use Filter Name Value Filter Value TagName:Use wildcard characters (wildcard,% means include all characters) Analog:TRUE(Include Analog Tag), FALSE(Exclude Analog Tag), default is TRUE。 Discrete:TRUE(Include Discrete Tag), FALSE(Exclude Discrete Tag), default is TRUE。 Text:TRUE(Include Text Tag), FALSE(Exclude Text Tag), default is TRUE。 Block:TRUE(Include Block), FALSE(Exclude Block), default is TRUE。 XML Response: <TagList> <Result> <Ret>0</Ret> <Total>4</Total> </Result> <Tags> <Tag> <Name>ConAna1</Name> <Description>Description1</Description> </Tag> <Tag> <Name>ConAna2</Name> <Description>Description2</Description> </Tag> <Tag> <Name>ConTxt1</Name> <Description>Description3</Description> </Tag> <Tag> <Name>ConTxt2</Name> <Description>Description3</Description> </Tag> </Tags> </TagList> JSON Response: { "Result":{ "Ret":0, "Total":4 }, "Tags":[{ "Name":"ConAna1", "Description":"Description1"}, { "Name":"ConAna2", "Description":"Description2"}, { "Name":"ConTxt1", "Description":"Description3"}, { "Name":"ConTxt2", "Description":"Description4" }] } Response Field: Field Name Description ID TagID Name Tag Name 7.1.2 All Tag list of SCADA node in the Project Get all Tag (Tag) list of SCADA node in the Project HTTP METHOD: GET XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName} XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName}/{NodeName} JSON Response: (The same as 7.1.1) HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName} XML Request: (The same as 7.1.1) XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName}/{NodeName} JSON Request: (The same as 7.1.1) JSON Response: (The same as 7.1.1) 7.1.3 All Tag list of the Comport Get all Tag (Tag) list of Comport of SCADA node in the Project HTTP METHOD: GET XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName}/{ComportNbr} XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName}/{NodeName}/{ComportNbr} JSON Response: (The same as 7.1.1) HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName}/{ComportNbr} XML Request: (The same as 7.1.1) XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/Json/TagList/{ProjName}/{NodeName}/{ComportNbr} JSON Request: (The same as 7.1.1) JSON Response: (The same as 7.1.1) 7.1.4 All Tag list of the Device Get all Tag (Tag) list of the Device of Comport of SCADA node in the Project HTTP METHOD: GET XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/TagList/Json/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} JSON Response: (The same as 7.1.1) HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/TagList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} XML Request: (The same as 7.1.1) XML Response: (The same as 7.1.1) JSON URL: http://localhost/WaWebService/TagList/Json/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} JSON Request: (The same as 7.1.1) JSON Response: (The same as 7.1.1) 7.2 TagDetail Get Tag’s detail information 7.2.1 Tag Detail Information under Project Node Get specific Tag detail information of Project node HTTP METHOD: POST XML URL: http://localhost/WaWebService/TagDetail/{ProjectName} JSON URL: http://localhost/WaWebService/Json/TagDetail/{ProjectName} XML Request: <TagDetail> <Tags> <Tag> <Name>ao-01</Name> <Attributes> <Attribute> <Name>ALL</Name> </Attribute> </Attributes> </Tag> <Tag> <Name>do-01</Name> <Attributes> <Attribute> <Name>ALL</Name> </Attribute> </Attributes> </Tag> </Tags> </TagDetail> JSON Request: { "Tags":[{ "Name":"String", "Attributes":[{ "Name":"String" }] }] } Request Parameter: Field Name Description Name Tag Name Attributes Attributes:According to Tag type, properties can be used as follows: Analog Tag: "NAME", "ADDRS", "DESCRP", "TYPE", "PADDRS", "NODE", "COM", "DEVNM", "SECL", "SECA", "ENUNIT", "SPANHI", "SPANLO", "OUTPHI", "OUTPLO", "DSPFMT", "ALMHI", "ALMLO", "ALMHH", "ALMLL", "ALMROC", "ADVHI", "ADVLO", "APRHH", "APRHI", "APRLO", "APRLL", "APRHDV", "APRLDV", "APRROC"。 Descrete Tag: "NAME", "ADDRS", "DESCRP", "TYPE", "PADDRS", "NODE", "COM", "DEVNM", "SECL", "SECA", "DESCR0", "DESCR1", "DESCR2", "DESCR3", "DESCR4", "DESCR5", "DESCR6", "DESCR7", "PRDIG0", "PRDIG1", "PRDIG2", "PRDIG3", "PRDIG4", "PRDIG5", "PRDIG6", "PRDIG7"。 Text Tag: "NAME", "ADDRS", "DESCRP", "TYPE", "PADDRS", "NODE", "COM", "DEVNM", "SECL", "SECA", "TXTLEN"。 If the properties assign ”ALL”, The returned properties will return all properties based on Tag Type. XML Response: <TagDetail> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Tags> <Tag> <NAME>String</NAME> <DESCRP>String</DESCRP> <ADDRS>String</ADDRS> <TYPE>String</TYPE> <PADDRS>String</PADDRS> <NODE>String</NODE> <COM>String</COM> <DEVNM>String</DEVNM> <SECA>String</SECA> <SECL>String</SECL> <ENUNIT>String</ENUNIT> <SPANHI>String</SPANHI> <SPANLO>String</SPANLO> <OUTPHI>String</OUTPHI> <OUTPLO>String</OUTPLO> <DSPFMT>String</DSPFMT> <ALMHH>String</ALMHH> <ALMHI>String</ALMHI> <ALMLO>String</ALMLO> <ALMLL>String</ALMLL> <ALMROC>String</ALMROC> <ADVHI>String</ADVHI> <ADVLO>String</ADVLO> <APRHH>String</APRHH> <APRHI>String</APRHI> <APRLO>String</APRLO> <APRLL>String</APRLL> <APRHDV>String</APRHDV> <APRLDV>String</APRLDV> <APRROC>String</APRROC> <DESCR0>String</DESCR0> <DESCR1>String</DESCR1> <DESCR2>String</DESCR2> <DESCR3>String</DESCR3> <DESCR4>String</DESCR4> <DESCR5>String</DESCR5> <DESCR6>String</DESCR6> <DESCR7>String</DESCR7> <PRDIG0>String</PRDIG0> <PRDIG1>String</PRDIG1> <PRDIG2>String</PRDIG2> <PRDIG3>String</PRDIG3> <PRDIG4>String</PRDIG4> <PRDIG5>String</PRDIG5> <PRDIG6>String</PRDIG6> <PRDIG7>String</PRDIG7> <TextLen>String</TextLen> </Tag> <Tag> <NAME>String</NAME> <DESCRP>String</DESCRP> <ADDRS>String</ADDRS> <TYPE>String</TYPE> <PADDRS>String</PADDRS> <NODE>String</NODE> <COM>String</COM> <DEVNM>String</DEVNM> <SECA>String</SECA> <SECL>String</SECL> <ENUNIT>String</ENUNIT> <SPANHI>String</SPANHI> <SPANLO>String</SPANLO> <OUTPHI>String</OUTPHI> <OUTPLO>String</OUTPLO> <DSPFMT>String</DSPFMT> <ALMHH>String</ALMHH> <ALMHI>String</ALMHI> <ALMLO>String</ALMLO> <ALMLL>String</ALMLL> <ALMROC>String</ALMROC> <ADVHI>String</ADVHI> <ADVLO>String</ADVLO> <APRHH>String</APRHH> <APRHI>String</APRHI> <APRLO>String</APRLO> <APRLL>String</APRLL> <APRHDV>String</APRHDV> <APRLDV>String</APRLDV> <APRROC>String</APRROC> <DESCR0>String</DESCR0> <DESCR1>String</DESCR1> <DESCR2>String</DESCR2> <DESCR3>String</DESCR3> <DESCR4>String</DESCR4> <DESCR5>String</DESCR5> <DESCR6>String</DESCR6> <DESCR7>String</DESCR7> <PRDIG0>String</PRDIG0> <PRDIG1>String</PRDIG1> <PRDIG2>String</PRDIG2> <PRDIG3>String</PRDIG3> <PRDIG4>String</PRDIG4> <PRDIG5>String</PRDIG5> <PRDIG6>String</PRDIG6> <PRDIG7>String</PRDIG7> <TextLen>String</TextLen> </Tag> </Tags> </TagDetail> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Tags":[{ "NAME":"String", "DESCRP":"String", "ADDRS":"String", "TYPE":"String", "PADDRS":"String", "NODE":"String", "COM":"String", "DEVNM":"String", "SECA":"String", "SECL":"String", "ENUNIT":"String", "SPANHI":"String", "SPANLO":"String", "OUTPHI":"String", "OUTPLO":"String", "DSPFMT":"String", "ALMHH":"String", "ALMHI":"String", "ALMLO":"String", "ALMLL":"String", "ALMROC":"String", "ADVHI":"String", "ADVLO":"String", "APRHH":"String", "APRHI":"String", "APRLO":"String", "APRLL":"String", "APRHDV":"String", "APRLDV":"String", "APRROC":"String", "DESCR0":"String", "DESCR1":"String", "DESCR2":"String", "DESCR3":"String", "DESCR4":"String", "DESCR5":"String", "DESCR6":"String", "DESCR7":"String", "PRDIG0":"String", "PRDIG1":"String", "PRDIG2":"String", "PRDIG3":"String", "PRDIG4":"String", "PRDIG5":"String", "PRDIG6":"String", "PRDIG7":"String", "TextLen":"String" }] } Response Field: Field Name Description NAME Tag Name DESCRP Description ADDRS Address TYPE Tag Type PADDRS Parameter Address NODE SCADA Node Name COM Port number DEVNM Device Name SECA Security Area SECL Security Level ENUNIT Engineering Unit SPANHI Span High SPANLO Span Low DSPFMT Display Format ALMHH Alarm High High ALMHI Alarm High ALMLO Alarm Low ALMLL Alarm Low Low ALMROC Rate of Change Alarm ADVHI Deviation Alarm High Limit ADVLO Deviation Alarm Low Limit APRHH High High Alarm Priority APRHI High Alarm Priority APRLO Low Alarm Priority APRLL Low Low Alarm Priority APRHDV High Deviation Alarm Priority APRLDV Low Deviation Alarm Priority APRROC Rate of Change Alarm Priority DESCR0 Status 0 DESCR1 Status 1 DESCR2 Status 2 DESCR3 Status 3 DESCR4 Status 4 DESCR5 Status 5 DESCR6 Status 6 DESCR7 Status 7 PRDIG0 Status 0 Alarm Priority PRDIG1 Status1 Alarm Priority PRDIG2 Status2 Alarm Priority PRDIG3 Status3 Alarm Priority PRDIG4 Status4 Alarm Priority PRDIG5 Status5 Alarm Priority PRDIG6 Status6 Alarm Priority PRDIG7 Status7 Alarm Priority TextLen Text Length 7.2.2 Tag Detail Information of SCADA Node Get Tag detail information of SCADA Node in Project HTTP METHOD: POST XML URL: http://localhost/WaWebService/TagDetail/{ProjName}/{NodeName} XML Request: (The same as 7.2.1) XML Response: (The same as 7.2.1) JSON URL: http://localhost/WaWebService/Json/TagDetail/{ProjName}/{NodeName} JSON Request: (The same as 7.2.1) JSON Response: (The same as 7.2.1) 8. Block 8.1 BlockList Get Block List 8.1.1 All Block list in Project Node Get all Block list in Project Node Support filter function when using POST method (only support TagName as filter). HTTP METHOD: GET XML URL: http://localhost/WaWebService/BlockList/{ProjectName} JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjectName} XML Response: <BlockList> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Blocks> <Block> <ID>Value</ID> <Name>String</Name> </Block> <Block> <ID>Value</ID> <Name>String</Name> </Block> </Blocks> </BlockList> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Blocks":[{ "ID":Value, "Name":"String" }] } Response Field: Field Name Description ID Block ID Name Block Name HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/BlockList/{ProjName} JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName} XML Request: <BlockList> <Filters> <Filter> <Name>String</Name> <Value>String</Value> </Filter> <Filter> <Name>String</Name> <Value>String</Value> </Filter> </Filters> </BlockList> JSON Request: { "Filters":[{ "Name":"String", "Value":"String" }] } Request Parameter: Field Name Description Name Only provide TagName as Filter Value Filter Value TagName:Use wildcard characters (wildcard, % means include all characters) XML Response: (The same as 8.1.1 BlockList GET Method) JSON Response: (The same as 8.1.1 BlockList GET Method) 8.1.2 All Block list in SCADA Node Get all Block list in SCADA Node HTTP METHOD: GET XML URL: http://localhost/WaWebService/BlockList/{ProjName}/{NodeName} XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName}/{NodeName} JSON Response: (The same as 8.1.1) HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/BlockList/{ProjName}/{NodeName} XML Request: (The same as 8.1.1) XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName}/{NodeName} JSON Request: (The same as 8.1.1) JSON Response: (The same as 8.1.1) 8.1.3 All Block list in Comport Get all Block list in Comport of SCADA node HTTP METHOD: GET XML URL: http://localhost/WaWebService/PointList/{ProjName}/{NodeName}/{ComportNbr} XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/PointList/{ProjName}/{NodeName}/{ComportNbr} JSON Response: (The same as 8.1.1) HTTP METHOD: POST (Use Filter) XML URL: http://localhost/WaWebService/BlockList/{ProjName}/{NodeName}/{ComportNbr} XML Request: (The same as 8.1.1) XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName}/{NodeName}/{ComportNbr} JSON Request: (The same as 8.1.1) JSON Response: (The same as 8.1.1) 8.1.4 All Block list of Device Get all Block list in Comport /SCADA node/Project node HTTP METHOD: GET XML URL: http://localhost/WaWebService/BlockList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} JSON Response: (The same as 8.1.1) HTTP METHOD: POST (USE Filter) XML URL: http://localhost/WaWebService/BlockList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} XML Request: (The same as 8.1.1) XML Response: (The same as 8.1.1) JSON URL: http://localhost/WaWebService/Json/BlockList/{ProjName}/{NodeName}/{ComportNbr}/{DeviceName} JSON Request: (The same as 8.1.1) JSON Response: (The same as 8.1.1) 8.2 BlockDetail Get Block’s detail information 8.2.1 Block detail information in Project Node Get all Block detail information in Project Node. HTTP METHOD: GET XML URL: http://localhost/WaWebService/BlockDetail/{ProjectName}/{BLOCKNAME} JSON URL: http://localhost/WaWebService/Json/BlockDetail/{ProjectName}/{BLOCKNAME} XML Response: <BlockDetail> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Tags> <Tag> <TagType>String</TagType> <TagName>String</TagName> <Description>String</Description> <Address>String</Address> </Tag> <Tag> <TagType>String</TagType> <TagName>String</TagName> <Description>String</Description> <Address>String</Address> </Tag> </Tags> </BlockDetail> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Tags":[{ "TagType":"String", "TagName":"String", "Description":"String", "Address":"String" }] } Response Field: Field Name Description TagType Tag Type TagName Tag Name Description Description Address Address 8.2.2 Block detail information in SCADA Node of Project Node Get all Block detail information in SCADA node/Project Node. HTTP METHOD: GET XML URL: http://localhost/WaWebService/BlockDetail/{ProjectName}/{NodeName}/{BLOCKNAME} XML Response: (The same as 8.2.1) JSON URL: http://localhost/WaWebService/Json/BlockDetail/{ProjectName}/{NodeName}/{BLOCKNAME} JSON Response: (The same as 8.2.1) 9. Tag Value 9.1 GetTagValue Get Tag (exclude TEXT type) value from WebAccess. 9.1.1 Get Tag Value in Project Node HTTP METHOD: POST XML URL: http://localhost/WaWebService/GetTagValue/{ProjectName} JSON URL: http://localhost/WaWebService/Json/GetTagValue/{ProjectName} XML Request: <GetTagValue> <Tags> <TagName> <Name>String</Name> </TagName> <TagName> <Name>String</Name> </TagName> </Tags> </GetTagValue> JSON Request: { "Tags":[{ "Name":"String" }] } Request Parameter: Field Name Description TagName Tag Name XML Response: <GetTagValue> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Values> <Value> <Name>String</Name> <Value>1.26743233E+15</Value> <Quality>Value</Quality> </Value> <Value> <Name>String</Name> <Value>1.26743233E+15</Value> <Quality>Value</Quality> </Value> </Values> </GetTagValue> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Values":[{ "Name":"String", "Value":1.26743233E+15, "Quality":Value }] } Response Field: Field Name Description Name Tag Name Value Value Quality Quality(0:Normal) 9.2 GetTagValueText Get Text Tag value from WebAccess. Or get analog / discrete Tag value that is formatted by WebAccess. 9.2.1 Get Text Tag Value in Project Node HTTP METHOD: POST XML URL: http://localhost/WaWebService/GetTagValueText/{ProjectName} JSON URL: http://localhost/WaWebService/Json/GetTagValueText/{ProjectName} XML Request: <GetTagValueText> <Tags> <TagName> <Name>String</Name> </TagName> <TagName> <Name>String</Name> </TagName> </Tags> </GetTagValueText> JSON Request: { "Tags":[{ "Name":"String" }] } Request Parameter: Field Name Description TagName Tag Name XML Response: (http://localhost/WaWebService/GetTagValueText/Express) <GetTagValueText> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Values> <Value> <Name>String</Name> <Value>1.26743233E+15</Value> <Quality>Value</Quality> </Value> <Value> <Name>String</Name> <Value>String</Value> <Quality>Value</Quality> </Value> </Values> </GetTagValueText> JSON Response: (http://localhost/WaWebService/Json/GetTagValueText/Express) { "Result":{ “Ret”:Value, “Total”:Value }, "Values":[{ "Name":"String", "Value":"String", "Quality":Value }] } Response Field: Field Name Description Name Tag Name Value Value Quality Quality(0:Normal) 9.3 SetTagValue Set Tag (exclude TEXT type) value to WebAccess. 9.3.1 Set Tag Value in Project Node HTTP METHOD: POST XML URL: http://localhost/WaWebService/SetTagValue/{ProjectName} JSON URL: http://localhost/WaWebService/Json/SetTagValue/{ProjectName} XML Request: <SetTagValue> <Tags> <Tag> <Name>String</Name> <Value>1.26743233E+15</Value> </Tag> <Tag> <Name>String</Name> <Value>1.26743233E+15</Value> </Tag> </Tags> </SetTagValue> JSON Request: { "Tags":[{ "Name":"String", "Value":1.26743233E+15 }] } Request Parameter: Field Name Description Name Tag Name Value Value XML Response: <Result> <Ret>Value</Ret> </Result> JSON Response: { “Ret”:Value } 9.4 SetTagValueText Set Text Tag value to WebAccess. 9.4.1 Set Text Tag Value HTTP METHOD: POST XML URL: http://localhost/WaWebService/SetTagValueText/{ProjectName} JSON URL: http://localhost/WaWebService/Json/SetTagValueText/{ProjectName} XML Request: <SetTagValueText> <Tags> <Tag> <Name>String</Name> <Value>String</Value> </Tag> <Tag> <Name>String</Name> <Value>String</Value> </Tag> </Tags> </SetTagValueText> JSON Request: { "Tags":[{ "Name":"String", "Value":"String" }] } Request Parameter: Field Name Description Name Tag Name Value Value XML Response: <Result> <Ret>Value</Ret> </Result> JSON Response: { “Ret”:Value } 9.5 SubscribeRealTimeTag Subscribe Real-Time Tag HTTP Method: POST XML Url: http://localhost/WaWebService/SubscribeRealTimeTag/{ProjectName} JSON Url: http://localhost/WaWebService/Json/SubscribeRealTimeTag/{ProjectName} XML Request: <SubscribeRealTimeTag> <Interval>Value</Interval> <Records>Value</Records> <Tags> <Tag> <Name>String</Name> </Tag> <Tag> <Name>String</Name> </Tag> </Tags> </SubscribeRealTimeTag> JSON Request: { "Interval":Value, "Records":Value, "Tags": {[ { "Name": "String" }, { "Name": "String" } ]} } Request Parameter: Field Name Description Interval Data Time Interval Records Query data Records of pre tag Name Tag Name XML Response: <SubscriptionID>Value</SubscriptionID> JSON Response: { “SubscriptionID”:Value } 9.6 UnSubscribeRealTimeTag Unsubscribe Real-Time Tag HTTP Method: POST XML Url: http://localhost/WaWebService/UnsubscribeRealTimeTag/{ProjectName} JSON Url: http://localhost/WaWebService/Json/UnsubscribeRealTimeTag/{ProjectName} XML Request: <UnsubscribeRealTimeTag> <UnsubscriptionID>Value</UnsubscriptionID> </UnsubscribeRealTimeTag> JSON Request: { "UnsubscriptionID":Value, } Request Parameter: Field Name Description UnsubscriptionID Unsubscribe Real-Time Tag ID XML Response: <UnsubscriptionID>Value</UnsubscriptionID> JSON Response: { "UnsubscriptionID":Value, } 9.7 GetRealTimeTagValue Get Real-Time Tag Value HTTP Method: POST XML Url: http://localhost/WaWebService/GetRealTimeTagValue/{ProjectName} JSON Url: http://localhost/WaWebService/Json/GetRealTimeTagValue/{ProjectName} XML Request: <GetRealTimeTagValue> <SubscriptionID>Value</SubscriptionID> </GetRealTimeTagValue> JSON Request: { "SubscriptionID":Value, } Request Parameter: Field Name Description SubscriptionID Subscribe Real-Time Tag ID XML Response: <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <RealTimeTagValue> <Name>String</Name> <StartTime>String</StartTime> <Values> <Value>Value</Value> <Value>Value</Value> </Values> <Name>String</Name> <StartTime>String</StartTime> <Values> <Value>Value</Value> <Value>Value</Value> </Values> </RealTimeTagValue> JSON Response: { "Result":{"Ret":Value,"Total":Value}, "RealTimeTagValue": [ { "Name":"String", "StartTime":"String", "Values": [ String, String ] }, { "Name":"String", "StartTime":"String", "Values": [ String, String ] } ] } Response Parameter: Field Name Description Total Total Records of pre tag Name Tag Name StartTime Start Time Value Tag value 10. Station Status 10.1 GetComportStatus Get comport status HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetComportStatus/{ProjectName}/{NodeName} JSON Url: http://localhost/WaWebService/Json/GetComportStatus/{ProjectName}/{NodeName} XML Response: <GetComportStatus> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Comports> <ComportStatus> <Port>Value</Port> <Status>Value</Status> <TotalDevice>Value</TotalDevice> </ComportStatus> <ComportStatus> <Port>Value</Port> <Status>Value</Status> <TotalDevice>Value</TotalDevice> </ComportStatus> </Comports> </GetComportStatus> Json Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Comports":[{ "Port":Value, "Status":Value, "TotalDevice":Value }] } Response Field: Field Name Description Port Port number:1 ~ 60 Status Port Status:0:Comm OK; 1:Bad; 2:Disabled TotalDevice Total Device number in the comport 10.2 GetDeviceStatus Get Devices Status HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetDeviceStatus/{ProjectName}/{NodeName}/{PORT} JSON Url: http://localhost/WaWebService/Json/GetDeviceStatus/{ProjectName}/{NodeName}/{PORT} XML Request: <GeDeviceStatus> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Devices> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> </Devices> </GeDeviceStatus> XML Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Devices":[{ "Unit":Value, "Status":Value }] } Response Field: Field Name Description Unit Device Unit Number:0 ~ 255 Status Device Status:0:Comm OK; 1:Bad; 2:Disabled 10.3 GetStationStatus Get Port Status and Device status in Comport. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetStationStatus/{ProjectName}/{NodeName} JSON Url: http://localhost/WaWebService/Json/GetStationStatus/{ProjectName}/{NodeName} XML Request: <GetStationStatus> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <Comports> <ComportStatus> <Port>Value</Port> <Status>Value</Status> <TotalDevice>Value</TotalDevice> <Devices> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> </Devices> </ComportStatus> <ComportStatus> <Port>Value</Port> <Status>Value</Status> <TotalDevice>Value</TotalDevice> <Devices> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> <DeviceStatus> <Unit>Value</Unit> <Status>Value</Status> </DeviceStatus> </Devices> </ComportStatus> </Comports> </GetStationStatus> Json Response: { "Result":{ “Ret”:Value, “Total”:Value }, "Comports":[{ "Port":Value, "Status":Value, "TotalDevice":Value, "Devices":[{ "Unit":Value, "Status":Value }] }] } Response Field: Field Name Description Port Port number:1 ~ 60 Status Port Status:0:Comm OK; 1:Bad; 2:Disabled TotalDevice Total Devices number in the Port Device Device communication status Field Name Description Unit Device Unit Number:0 ~ 255 Status Device Status:0:Comm; 1:Bad; 2:Disabled 10.4 SetComportStatus Set Port status. HTTP METHOD: GET XML URL: http://localhost/WaWebService/SetComportStatus/{ProjectName}/{NodeName}/{PORT}{State} JSON Url: http://localhost/WaWebService/Json/SetComportStatus/{ProjectName}/{NodeName}/{PORT}/{State} Parameter Name Description Port Port number:1 ~ 60 State Status:0:Enable; Other:Disable XML Response: <Result> <Ret>Value</Ret> </Result> Json Response: { “Ret”:Value } 10.5 SetDeviceStatus Set Device status HTTP METHOD: GET XML URL: http://localhost/WaWebService/SetDeviceStatus/{ProjectName}/{NodeName}/{PORT}/{UNIT}/{STATE} JSON Url: http://localhost/WaWebService/Json/SetDeviceStatus/{ProjectName}/{NodeName}/{PORT}/{UNIT}/{STATE} Parameter Name Description Port Port number:1 ~ 60 Unit Device Unit Number:0 ~ 255 State Status:0:Enable; Other:Disable XML Response: <Result> <Ret>Value</Ret> </Result> Json Response: { “Ret”:Value } 11. Data log 11.1 GetDataLog Get Data log. HTTP METHOD: POST XML URL: http://localhost/WaWebService/GetDataLog/{ProjectName} http://localhost/WaWebService/GetDataLog/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/GetDataLog/{ProjectName} http://localhost/WaWebService/Json//GetDataLog/{ProjectName}/{NodeName} XML Request: <GetDataLog> <StartTime>yyyy-mm-dd HH:MM:SS</StartTime> <IntervalType>M</IntervalType> <Interval>1</Interval> <Records>2</Records> <Tags> <Tag> <Name>Tag1</Name> <DataType>0</DataType> </Tag> <Tag> <Name>Tag2</Name> <DataType>0</DataType> </Tag> </Tags> </GetDataLog> JSON Request: { "StartTime":"String", "IntervalType":"String", "Interval":Value, "Records":Value, "Tags":[{ "Name":"String", "DataType":"String" }] } Request Parameter: Field Name Description StartTime Start Time:Format is yyyy-mm-dd HH:MM:SS IntervalType Query time unit. S:Seconds;M:Minutes;H:Hours;D:Days Interval Data Time Interval, unit as Interval Type. Records Query data Recordsof pre tag Name Tag Name。 DataType DataType :0 – Last, 1-Min, 2 – Max, 3 - Avg XML Response: <GetDataLog> <Result> <Ret>0</Ret> <Total>2</Total> </Result> <DataLog> <Tags> <Name>Tag1</Name> <Total>60</Total> <Values> <string>1</string> <string>2</string> . . . <string>60</string> </Values> </Tags> <Tags> <Name>Tag2</Name> <Total>60</Total> <Values> <string>1</string> <string>2</string> . . . <string>60</string> </Values> </Tags> </DataLog> </GetDataLog> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "DataLog":[{ "Name":"String", "Total":Value, "Values":["String"] }] } Response Field: Field Name Description Name Tag Name。 Total Total Records of pre tag Values Data log Value, each data pre row 12. Alarm 12.1 GetAlarmSummaryCount Get Alarm Summary count data HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetAlarmSummaryCount/{ProjectName} JSON URL: http://localhost/WaWebService/Json/GetAlarmSummaryCount/{ProjectName} XML Response: <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> JSON Response: <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> 12.2 GetAlarmSummary Get Alarm Summary data HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetTagValue/{ProjectName}/{start}/{count} JSON URL: http://localhost/WaWebService/Json/GetTagValue/{ProjectName}/{start}/{count} XML Response: <GetAlarmSummary> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <AlarmTagList> <AlarmTag> <Name>String</Name> <Time>String</Time> <AlarmPriority>Value</AlarmPriority> <AckStatus>Value</AckStatus> <AlarmGroup>Value</AlarmGroup> <AlarmValue>1.26743233E+15</AlarmValue> <AlarmLimit>1.26743233E+15</AlarmLimit> <AlarmType>Value</AlarmType> <NodeName>String</NodeName> <Locked>Value</Locked> </AlarmTag> <AlarmTag> <Name>String</Name> <Time>String</Time> <AlarmPriority>Value</AlarmPriority> <AckStatus>Value</AckStatus> <AlarmGroup>Value</AlarmGroup> <AlarmValue>1.26743233E+15</AlarmValue> <AlarmLimit>1.26743233E+15</AlarmLimit> <AlarmType>Value</AlarmType> <NodeName>String</NodeName> <Locked>Value</Locked> </AlarmTag> </AlarmTagList> </GetAlarmSummary> JSON Response: (http://localhost/WaWebService/Json/GetDataLog/Express/0/5) { "Result":{ “Ret”:Value, “Total”:Value }, "AlarmTagList":[{ "Name":"String", "Time":"String", "AlarmPriority":Value, "AckStatus":Value, "AlarmGroup":Value, "AlarmValue":1.26743233E+15, "AlarmLimit":1.26743233E+15, "AlarmType":Value, "NodeName":String, "Locked":數值 }] } Response Field: Field Name Description Name Tag Name。 Time Alarm Time AlarmPriority Alarm Priority AckStatus Acknowledge Status (0:In normal unacked; 1:Unacked; 2: Acked) AlarmGroup Alarm Group AlarmValue Alarm Value AlarmLimit Alarm Limit value AlarmType Alarm Type NodeName SCADA Node Name Locked Lock Alarm 12.3 GetAlarmLogCount Get Alarm log count data HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetAlarmLogCount/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/GetAlarmLogCount/{ProjectName}/{NodeName} XML Response: <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> XML Response: { “Ret”:Value, “Total”:Value } 12.4 GetAlarmLogIndex Since the maximum count of alarm log in WebAccess is 5000, while the total number of alarm log above 5000, WebAccess will circularly overwrite the first record and so on. Using GetAlarmLogIndex service can get newest record’s index position (between 1~5000). You can use this service periodically and compare the index with previous index. If the index position has been changed, it means that the Alarm Log has been updated. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetAlarmLogIndex/{ProjectName}/{NodeName} XML URL: http://localhost/WaWebService/Json/GetAlarmLogIndex/{ProjectName}/{NodeName} XML Response: <Result> <Ret>Value</Ret> <Index>Value</Index> </Result> JSON Response: { “Ret”:Value, “Index”:Value } 12.5 GetAlarmLog Get Alarm log data. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetAlarmLog/{ProjectName}/{NodeName}/{Start}/{Count} JSON URL: http://localhost/WaWebService/Json/GetAlarmLog/{ProjectName}/{NodeName}/{Start}/{Count} XML Response: <GetAlarmLog> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <AlarmLogs> <AlarmData> <Time>String</Time> <Priority>String</Priority> <TagName>String</TagName> <Description>String</Description> <Action>String</Action> </AlarmData> <AlarmData> <Time>String</Time> <Priority>String</Priority> <TagName>String</TagName> <Description>String</Description> <Action>String</Action> </AlarmData> </AlarmLogs> </GetAlarmLog> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "AlarmLogs":[{ "Time":"String", "Priority":"String", "TagName":"String", "Description":"String", "Action":"String" }] } Response Field: Field Name Description Time Alarm Time Priority Alarm Priority TagName Tag Name Description TagDescription。 Action Action 12.6 AlarmAck Acknowledge alarms HTTP METHOD: POST Acknowledge Alarm in Project XML URL: http://localhost/WaWebService/AlarmAck/{ProjectName} JSON URL: http://localhost/WaWebService/Json/AlarmAck/{ProjectName} Acknowledge Alarm in SCADA XML URL: http://localhost/WaWebService/AlarmAck/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/AlarmAck/{ProjectName}/{NodeName} XML Request: <AlarmAck> <IpAddress>String</IpAddress> <Computer>String</Computer> <User>String</User> <Tags> <TagName> <Name>String</Name> </TagName> <TagName> <Name>String</Name> </TagName> </Tags> </AlarmAck> JSON Request: { "IpAddress":"String", "Computer":"String", "User":"String", "Tags":[{ "Name":"String" }] } Request Parameter: Field Name Description IpAddress IP Address。 Computer Computer Name。 User Tags User Tag Field Name Description Name TagName。 XML Response: <Result> <Ret>Value</Ret> </Result> JSON Response: { “Ret”:Value } 12.7 AlarmAckAll Acknowledge all alarms HTTP METHOD: POST Acknowledge all alarms in Project XML URL: http://localhost/WaWebService/AlarmAckAll/{ProjectName} JSON URL: http://localhost/WaWebService/Json/AlarmAckAll/{ProjectName} Acknowledge all alarms in SCADA XML URL: http://localhost/WaWebService/AlarmAckAll/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/AlarmAckAll/{ProjectName}/{NodeName} XML Request: <AlarmAckAll> <IpAddress>String</IpAddress> <Computer>String</Computer> <User>String</User> </AlarmAckAll> JSON Request: { "IpAddress":"String", "Computer":"String", "User":"String" } Request Parameter: Field Name Description IpAddress IP Address。 Computer Computer Name。 User User XML Response: <Result> <Ret>Value</Ret> </Result> JSON Response: { “Ret”:Value } 13. Action 13.1 GetActionLogCount Get Action log count data. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetActionLogCount/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/GetActionLogCount/{ProjectName}/{NodeName} XML Request: <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> JSON Request: { “Ret”:Value, “Total”:Value } 13.2 GetActionLogIndex Since the maximum count of action log in WebAccess is 5000, while the total number of action log above 5000, WebAccess will circularly overwrite the first record and so on. Using GetActionLogIndex service can get newest record’s index position (between 1~5000). You can use this service periodically and compare the index with previous index. If the index position has been changed, it means that the Action Log has been updated. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetActionLogIndex/{ProjectName}/{NodeName} JSON URL: http://localhost/WaWebService/Json/GetActionLogIndex/{ProjectName}/{NodeName} XML Request: <Result> <Index>Value</Index> <Ret>Value</Ret> </Result> JSON Request: { “Index”:Value, “Ret”:Value, } 13.3 GetActionLog Get Action log data. HTTP METHOD: GET XML URL: http://localhost/WaWebService/GetActionLog/{ProjectName}/{NodeName}/{Start}/{Count} JSON URL: http://localhost/WaWebService/Json/GetActionLog/{ProjectName}/{NodeName}/{Start}/{Count} XML Response: <GetActionLog> <Result> <Ret>Value</Ret> <Total>Value</Total> </Result> <ActionLogs> <ActionData> <Time>String</Time> <Priority>String</Priority> <TagName>String</TagName> <Description>String</Description> <Action>String</Action> </ActionData> <ActionData> <Time>String</Time> <Priority>String</Priority> <TagName>String</TagName> <Description>String</Description> <Action>String</Action> </ActionData> </ActionLogs> </GetActionLog> JSON Response: { "Result":{ “Ret”:Value, “Total”:Value }, "ActionLogs":[{ "Time":"String", "Priority":"String", "TagName":"String", "Description":"String", "Action":"String" }] } Response Field: Field Name Description Time Time Priority Priority TagName Tag Name Description Description Action Action