Create Script Execution
DescriptionScript execution represents asynchronous execution of a script in a specified runspace. When created, the script execution starts running in the runspace. To monitor the script execution progress, poll the resource by id. When the request is accepted Location header is returned in the response that leads you to the script execution resource.
Request
URLURL
Request Body
{
"runspace_id": "string",
"script": "string"
}
Content of the script.
Unique identifier of the runspace where script execution is performed.
Unique identifier for the object.
Name of the script execution. It is optional to give a name of the script execution on create request. If name was not specified on the script execution creation, the field has null value.
Reason for the current script execution state. In most of the cases reason field will be empty. In case of an error or cancellation reason will contain information about the reason that caused script execution to become in this state.
Time at which the script execution was finished. String representing time in format ISO 8601.
List of arguments that will be passed to the script. If script content defines parameters argument can be provided. The parameter names defined in the script content should match the names specified in this list.
Time at which the script execution was started. String representing time in format ISO 8601.
ScriptExecutionState defines possible script execution states.
Possible values are: success , error , running , canceled
Authentication
Response
Response BodyResponse Body
202 Accepted
A script execution resource in running state.
{
"end_time": "string",
"id": "string",
"name": "string",
"output_objects_format": "text",
"reason": "string",
"runspace_id": "string",
"script": "string",
"script_parameters": {},
"start_time": "string",
"state": "success"
}
Content of the script.
Unique identifier of the runspace where script execution is performed.
Unique identifier for the object.
Name of the script execution. It is optional to give a name of the script execution on create request. If name was not specified on the script execution creation, the field has null value.
Reason for the current script execution state. In most of the cases reason field will be empty. In case of an error or cancellation reason will contain information about the reason that caused script execution to become in this state.
Time at which the script execution was finished. String representing time in format ISO 8601.
List of arguments that will be passed to the script. If script content defines parameters argument can be provided. The parameter names defined in the script content should match the names specified in this list.
Time at which the script execution was started. String representing time in format ISO 8601.
ScriptExecutionState defines possible script execution states.
Possible values are: success , error , running , canceled
Errors
Unauthorized
Not Found
Server Error