---
title: "Get script"
method: GET
path: "/api/endpoint/scripts_library/{script_id}"
tags: ["Security Endpoint Management API"]
---

# Get script

`GET /api/endpoint/scripts_library/{script_id}`

**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/{script_id}</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get a script

## Path parameters

- `script_id` string, required — The ID of the script entry.

## Response `200`

Get script response

- SecurityEndpointManagementAPIScriptsApiResponse
  - `data` SecurityEndpointManagementAPIEndpointScript
    - `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` SecurityEndpointManagementAPIEndpointScriptPlatform[]
    - `requiresInput` boolean
    - `tags` SecurityEndpointManagementAPIEndpointScriptTags[] — Tags that categorize the script
    - `updatedAt` string, date-time
    - `updatedBy` string
    - `version` string

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
