Create script
- Base URL
-
https://{kibana_url}
- POST /api/endpoint/scripts_library
- POST /s/{space_id}/api/endpoint/scripts_library
Refer to Spaces for more information.
Create a new script entry by uploading a script file
Request body
-
fileTyperequired -
The type of the uploaded file, which determines the expected value of
pathToExecutable. IffileTypeis "script", thenpathToExecutableshould not be included. IffileTypeis "archive", thenpathToExecutableis required and should specify the path to the executable file within the archive. -
Values:
scriptarchive -
instructionsstring · max length: 10000 -
Instructions for using the script, including details around its supported input arguments
-
pathToExecutablestring · max length: 4096 -
Used only for when the uploaded script is an archive (.zip file for example). This property defines the relative path to the file included in the archive that should be executed once its contents are extracted. The path should be relative to the root of the archive.
-
Tags to categorize the script
-
Values:
remediationActiondataCollectionnetworkDiagnosticsnetworkActionsystemInventoryforensicCollectionthreatHuntingdiscoverysystemManagementuserManagementtroubleshooting
Response
Action request was successfully created
-
dataobject -
downloadUristring -
URI to download the script file. Note that this is the relative path and does not include the space (if applicable)
-
instructionsstring -
Instructions for using the script, including details around its supported input arguments
-
pathToExecutablestring -
The relative path to the file included in the archive that should be executed once its contents are extracted. Applicable only for scripts uploaded as an archive (.zip file for example).
-
Tags that categorize the script
-
Values:
remediationActiondataCollectionnetworkDiagnosticsnetworkActionsystemInventoryforensicCollectionthreatHuntingdiscoverysystemManagementuserManagementtroubleshooting