Security Endpoint Management API

Spaces method and path for this operation:

<div><span class="operation-verb patch">patch</span>&nbsp;<span class="operation-path">/s/{space_id}/api/endpoint/scripts_library/{script_id}</span></div>

Refer to Spaces for more information.

Update (full or partial) a script entry

patch/api/endpoint/scripts_library/{script_id}

Request

  • Base URL
    https://localhost:5601
  • URL
    https://localhost:5601/api/endpoint/scripts_library/{script_id}
  • Auth
    • API key in header Authorization
    • or HTTP basic

Path parameters

script_idstring required

The ID of the script entry to be updated.

Example:fr518850-681a-4y60-aa98-e22640cae2b8

Request body multipart/form-data

descriptionstring

Description of the script and its purpose/functionality

examplestring

Example usage of the script

fileobject

The script file upload

fileType'script' | 'archive'

The type of the uploaded file, which determines the expected value of pathToExecutable. If fileType is "script", then pathToExecutable should not be included. If fileType is "archive", then pathToExecutable is required and should specify the path to the executable file within the archive.

instructionsstring

Instructions for using the script, including details around its supported input arguments

namestring

Name of the script

pathToExecutablestring

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.

platformSecurityEndpointManagementAPIEndpointScriptPlatform[]

Platforms supported by the the script

requiresInputboolean

Whether the script requires input arguments

tagsSecurityEndpointManagementAPIEndpointScriptTags[]

Tags to categorize the script

versionstring

Version of the script

Example request

{
  "pathToExecutable": "./bin/script.sh"
}

Response

Action request was successfully updated

Example response

{
  "data": {
    "description": "Collects host data for investigation",
    "downloadUri": "/api/endpoint/scripts_library/123e4567-e89b-12d3-a456-426655440000/download",
    "example": "./collect_host_data.sh --help",
    "fileHash": "abf573681eb54aac5e05e35bf186d4d31abe45ecf242461490523f11d2a8fbb8",
    "fileName": "collect_host_data.sh",
    "fileSize": 12345,
    "id": "123e4567-e89b-12d3-a456-426655440000",
    "instructions": "Collects host data for investigation",
    "name": "Collect host data",
    "platform": [
      "linux",
      "macos"
    ],
    "requiresInput": false
  }
}

Changes

    • breaking

      the request property's minLength was increased from 0 to 1

    • warning

      for the path request parameter script_id, the maxLength was set to 256

    • warning

      the request property's maxLength was set to 10000

    • warning

      the request property's maxLength was set to 10000

    • warning

      the request property's maxLength was set to 10000

    • warning

      the request property's maxLength was set to 256

    • warning

      the request property's maxLength was set to 4096

    • info

      added the new optional request property