Changes

Jump to navigation Jump to search
m
no edit summary
Line 3: Line 3:  
<!--T:1-->
 
<!--T:1-->
 
API2 works via web socket requests, so you can interact with your Larnitech server from a browser using extensions (such as WebSocket Test Client).<br>
 
API2 works via web socket requests, so you can interact with your Larnitech server from a browser using extensions (such as WebSocket Test Client).<br>
To get started, you should:
+
To get started, you should:<br>
Establish a web socket connection.
+
1. Establish a web socket connection.
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
 
ws://IPADDR:PORT/api
 
ws://IPADDR:PORT/api
Line 10: Line 10:  
Where:
 
Where:
 
IPADDR – ip address of your metaforsa or DE-MG;
 
IPADDR – ip address of your metaforsa or DE-MG;
PORT – port for API2 (you can get it from LT Setup=&gt;General=&gt;API=&gt;Websocket port (2041 by default);
+
PORT – port for API2 (you can get it from LT Setup=&gt;General=&gt;API=&gt;Websocket port (2041 by default);<br>
Authorize
+
2. Authorize
 
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
 
{
 
{
Line 18: Line 18:  
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
Where XXXXXXXXXXXXXXX - LT Setup=&gt;Security=&gt;Show API key
+
Where XXXXXXXXXXXXXXX - LT Setup=&gt;Security=&gt;Show API key<br>
After this you can send json requests:
+
3.After this you can send json requests:
    
Fields of JSON_REQUEST:
 
Fields of JSON_REQUEST:
editor, Interface administrators, Administrators, translation-admin, translator
9,706

edits

Navigation menu