GET /api/endpoint/scripts_library/{script_id}

Spaces method and path for this operation:

get /s/{space_id}/api/endpoint/scripts_library/{script_id}

Refer to Spaces for more information.

Get a script

Path parameters

  • script_id string Required

    The ID of the script entry.

Responses

  • 200 application/json

    Get script response

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • createdAt string(date-time)
      • createdBy string
      • description string

        Description of the script and its purpose/functionality

      • downloadUri string

        URI to download the script file. Note that this is the relative path and does not include the space (if applicable)

      • example string
      • fileHash string

        SHA256 hash of the script file that was uploaded

      • fileName string

        Name of the script file that was uploaded

      • fileSize integer

        Size of the script file that was uploaded in bytes

      • id string(uuid)
      • instructions string

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

      • name string
      • pathToExecutable string

        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).

      • platform array[string]

        Values are linux, macos, or windows.

      • requiresInput boolean
      • tags array[string]

        Tags that categorize the script

        Values are remediationAction, dataCollection, networkDiagnostics, networkAction, systemInventory, forensicCollection, threatHunting, discovery, systemManagement, userManagement, or troubleshooting.

      • updatedAt string(date-time)
      • updatedBy string
      • version string
GET /api/endpoint/scripts_library/{script_id}
curl \
 --request GET 'https://localhost:5601/api/endpoint/scripts_library/fr518850-681a-4y60-aa98-e22640cae2b8' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "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"
    ]
  }
}