Next revision
|
Previous revision
|
en:pro:remoteapi:codesamples:login [06/03/2013 15:32] 127.0.0.1 external edit |
en:pro:remoteapi:codesamples:login [29/11/2013 13:31] (current) |
{{indexmenu_n>1}} | {{indexmenu_n>1}} |
====== Логин/логаут ====== | ====== Login/logout ====== |
Для выполнения любой операции в Wialon Pro вам понадобится авторизироваться и получить ID сессии. | |
| |
| To execute any command in Wialon Pro, you need authorize and get session ID. |
| |
===== Логин ===== | ===== Login ===== |
| |
Ниже рассмотрен пример авторизации. Подробное описание формата возвращаемого значения присутствует в разделе [[../apiref/core/login|core/login]]. | The example of authorization is described below. Detailed description of response format you can find in chapter [[../apiref/core/login|core/login]]. |
<code> | <code> |
<your_wialon_pro_address>/ajax.html?svc=core/login& | <your_wialon_pro_address>/ajax.html?svc=core/login& |
</code> | </code> |
| |
Результат выполнения: | Response: |
<code javascript> | <code javascript> |
{ | { |
} | } |
</code> | </code> |
| For further operations, we need session ID which is specified in the field **ssid**. In our case it is **86e4cb77576c64fa96fcc2eae34a9079**. |
| |
Для выполнения дальнейших операций нам понадобится ID сессии, он указан в поле **"ssid"**. | ===== Logout ===== |
| To stop working with Wialon and logout from the system, deactivate the session making the following request: |
===== Логаут ===== | |
Для завершения работы с Wialon нужно совершить выход. В предыдущем пункте после авторизации мы получили //ID сессии// - **86e4cb77576c64fa96fcc2eae34a9079**. Чтобы деактивировать данную сессию, нужно выполнить следующий запрос: | |
| |
<code> | <code> |
<your_wialon_pro_address>/ajax.html?svc=core/logout¶ms={}&sid=86e4cb77576c64fa96fcc2eae34a9079 | <your_wialon_pro_address>/ajax.html?svc=core/logout¶ms={}&ssid=86e4cb77576c64fa96fcc2eae34a9079 |
</code> | </code> |
| |
Результат выполнения: | Response: |
<code javascript> | <code javascript> |
{ | { |
</code> | </code> |
| |
Такой результат говорит об успешном выходе из системы. | Such result tells us that the exit was successful. |
| |
| |
Параметры данного запроса, а так же возвращаемое им значение описаны в разделе [[../apiref/core/logout]]. | Parameters of this request as well as the returned value are described in the chapter [[../apiref/core/logout]]. |