Synology DS418 Transactions in Surveillance Station 8.1.0 and above - Page 31
API error code, Examples, Operation failed, Transactions, Add-ons, Surveillance Station
View all Synology DS418 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 31 highlights
Send Transactions Using WebAPI API error code Code 400 401 Description Operation failed Illegal parameters Operation failed means the system is in an abnormal status. Please confirm that the Transactions service is enabled in the Add-ons application. If the service has been enabled, please try to restart Surveillance Station. Several reasons can cause Illegal parameters, here are some common reasons listed as follows: • Incomplete or invalid parameters. • Tried to append, complete, or cancel a session before it started. • The sessionId does not match any existing sessions. • The deviceName is not found in Surveillance Station. • The timestamp of AppendData, Complete, or Cancel is less than the timestamp of Begin in one of the sessions. Examples • Start a transaction: http://192.168.2.3:5000/WebAPI/entry.cgi?api=SYNO.SurveillanceStation. Transactions.Transaction&method="Begin"&version=2&deviceName="POS01"&sessionId="1 "&timeout=300 • Append data: http://192.168.2.3:5000/WebAPI/entry.cgi?api=SYNO.SurveillanceStation. Transactions.Transaction&method="AppendData"&version=2&deviceName="POS01"&sessio nId="1"&content="Start\n2017/01/01" • Append data: http://192.168.2.3:5000/WebAPI/entry.cgi?api=SYNO.SurveillanceStation. Transactions.Transaction&method="AppendData"&version=2&deviceName="POS01"&sessio nId="1"&content="Pen $40\nBook $300" • Append data: http://192.168.2.3:5000/WebAPI/entry.cgi?api=SYNO.SurveillanceStation. Transactions.Transaction&method="AppendData"&version=2&deviceName="POS01"&sessio nId="1"&content="Total $340\nEnd" • Complete a transaction: http://192.168.2.3:5000/WebAPI/entry.cgi?api=SYNO. SurveillanceStation.Transactions.Transaction&method="Complete"&version=2&deviceName ="POS01"&sessionId="1" 30