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

# Update script

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

**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](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Update (full or partial) a script entry

## Path parameters

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

## Response `200`

Action request was successfully updated

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