Submit a Script to Run

软件教程 admin 2024-04-24 08:52 343 0

Submit a Script to Run

Submits a script to the server to run.

The request body can be one or more actions by using YAML, JSON, or BTXML script.It can also be the path of the script file to run.The "File" property that specifies the script file path and the "KeepStatus" property that specifies how long to keep the script status can both be specified in the request body (by using JSON format) or in the query parameters.

For a list of the actions supported by the Actions API, see Available Actions in the Action API.


发布的操作脚本可以是 YAML 或 JSON 格式。A YAML reference document is available that provides complete details about the specific properties for each action and describes how to combine actions into groups and create arrays of actions to be sent as one script to the server.The YAML actions reference is provided as follows:

  • Online at https://help.seagullscientific.com/Actions_YAML_reference/

  • In the BarTender installation directory at C:\Program Files\Seagull\BarTender 2022\HelpAPI\Actions_YAML_Reference\index.html



For more information about this command, including descriptions of any path and request parameters, request body schema, response codes and schemas, and payload examples, refer to the online API reference for this command at the following web page:


Submit a script to run

URI

http://localhost:5159/api/actions

Path Parameters

无:

Query Parameters

KeepStatus

类型:字符串

Specifies the amount of time to keep the script and its status in the server.The time units can be minutes (m), hours (h), or seconds (s).The time values can be floating point numbers.Valid values resemble "1.5m", "2h", or "300s".The minimum allowed time is 60 seconds.The default value is "60m".Optional.


文件

类型:字符串

Specifies the path of the script file to run.Note that if a value for this query parameter is provided, the script will be retrieved from the path that is specified by the query parameter, and the request body will be ignored.Optional.


等待

类型:字符串

Specifies the amount of time that the client waits while the script is running before the service returns a status response.The response is returned when the specified amount of time elapses or when the script finishes.If the script has not yet finished when the time elapses, it does continue to run.The time units can be minutes (m), hours (h), or seconds (s).The time values can be floating point numbers.Valid values resemble "1.5m", "2h", or "300s".The default value is "0s".The maximum value is "30s".Optional.


MessageCount

类型:Integer <int32>

Specifies the maximum number of messages that are retrieved after the wait period elapses and the script runs successfully.When the MessageCount parameter is greater than 0, the specified number of the last logged messages is retrieved.Optional.


MessageSeverity

类型:字符串

Specifies the types of messages that are retrieved after the wait period elapses and the script runs successfully.Valid values are "Error", "Warning", and "Info".When "Error" is specified, only messages that have a severity level of "Error" are retrieved.When "Warning" is specified, messages that have a severity level of "Error" or "Warning" are retrieved.When "Info" is specified, all messages are retrieved.The default value is "Error."Optional.

 


评论区