Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:sidebar:remoteapi:apiref:core:batch [09/07/2013 13:09]
zuve
en:sidebar:remoteapi:apiref:core:batch [29/11/2013 13:31]
Line 1: Line 1:
-{{indexmenu_n>​18}} 
-====== Executing several commands ====== 
-Several commands can be executed at one request. For this, use **core/​batch**: ​ 
-<code javascript>​ 
-svc=core/​batch&​params=[ 
- { 
- "​svc":<​text>,​ 
- "​params":​{} 
- } 
-       ] 
-</​code>​ 
  
-This command also can be called by following request: 
-<code javascript>​ 
-svc=core/​batch&​params={ 
- "​params":​ [{ 
- "​svc":<​text>,​ 
- "​params":​{} 
- }], 
- "​flags":<​uint>​} 
-</​code>​ 
- 
-:!: You can find an example of this request in the sample [[../​../​codesamples/​batch]]. 
- 
-===== Parameters ===== 
-^ Name ^ Description ^ 
-| svc | command name | 
-| params | parameters | 
-| flags | 0 - execute all commands (by default), 1 - stop batch in case of returning error by some command | 
- 
-===== Response ===== 
-<code javascript>​ 
-[ 
- { /* object with data if there are no errors */ 
- ... 
- }, 
- { /* error code if an error has occurred */ 
- "​error":<​int>​  
- }, 
- ... 
-] 
-</​code>​ 
- 
-:!:  If **"​flags"​** parameter has been set as **"​1"​** and an error has occured while executing one of the commands, then all consequent commands will return error 10. 
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam