Spaces method and path for this operation:
Refer to Spaces for more information.
Update (full or partial) a script entry
Body
Required
-
Description of the script and its purpose/functionality
Maximum length is
10000. -
Example usage of the script
Maximum length is
10000. -
The script file upload
-
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 are
scriptorarchive. -
Instructions for using the script, including details around its supported input arguments
Maximum length is
10000. -
Name of the script
Minimum length is
1, maximum length is256. -
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.
Maximum length is
4096. -
Platforms supported by the the script
Values are
linux,macos, orwindows. -
Whether the script requires input arguments
-
Version of the script
Minimum length is
1, maximum length is256.
curl \
--request PATCH 'https://localhost:5601/api/endpoint/scripts_library/fr518850-681a-4y60-aa98-e22640cae2b8' \
--header "Authorization: $API_KEY" \
--header "Content-Type: multipart/form-data"
{"instructions" => "./collect_host_data.sh --help"}
{"fileType" => "script"}
{"fileType" => "archive", "pathToExecutable" => "./bin/collect_host_data.sh"}
{
"data": {
"description": "Collects host data for investigation",
"file": "./collect_host_data.sh",
"fileType": "script",
"id": 1234567890,
"instructions": "No arguments required",
"name": "Collect host data",
"platform": [
"linux",
"macos"
]
}
}