v53

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-076771,7565.2 MB
Security Endpoint Management API

Get a list of scripts

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Retrieve a list of scripts

get/api/endpoint/scripts_library

Query parameters

pageinteger

Page number

Example:1

Page number of the results to return. Defaults to 1.

pageSizeinteger

Number of items per page

Example:10

Number of results to return per page. Defaults to 10. Max value is 1000.

sortField'name' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'fileSize'

Determines which field is used to sort the results.

Example:updatedAt

The field to sort the results by. Defaults to name.

sortDirection'asc' | 'desc'

Determines the sort order.

Example:desc

The direction to sort the results by. Defaults to asc (ascending).

kuerystring

A KQL string.

Example:platform:windows

A KQL query string to filter the list of scripts. Nearly all fields in the script object are searchable.

Response

List of scripts response

pageinteger

Page number

pageSizeinteger

Number of items per page

sortDirection'asc' | 'desc'

Determines the sort order.

sortField'name' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'fileSize'

Determines which field is used to sort the results.

totalinteger

The total number of scripts matching the query

Example response

{
  "data": [
    {
      "createdBy": "elastic",
      "description": "Collects host data for investigation",
      "downloadUri": "/api/endpoint/scripts_library/123e4567-e89b-12d3-a456-426655440000/download",
      "fileHash": "abf573681eb54aac5e05e35bf186d4d31abe45ecf242461490523f11d2a8fbb8",
      "fileName": "collect_host_data.sh",
      "fileSize": 12345,
      "id": "123e4567-e89b-12d3-a456-426655440000",
      "name": "Collect host data",
      "updatedBy": "admin"
    }
  ],
  "page": 1,
  "pageSize": 10,
  "sortDirection": "desc",
  "sortField": "updatedAt"
}