Partially update a single script#

Description#

Partially updates the properties of a script. Only one property may be updated at a time. Only python3.13 is accepted when replacing /runtime; python3.9 is deprecated and rejected.

Options#

Path

PATCH Operations Supported

/description

replace

/name

replace

/runtime

replace (python3.13 only)

PATCH /scripts/{scriptId}

Required OAuth Scopes

file:write

Parameters#

Parameter

In

Type

Required

Description

X-Version

header

string

true

Version of the API (2026-09-01.scripting.preview)

scriptId

path

string

true

The unique identifier of the script

body

body

JSONPatchDocument

true

A collection of patch operations to apply to the script. Currently only one operation may be applied at a time.

Body parameter example#

[
  {
    "op": "replace",
    "path": "/description",
    "value": "Hide All Rows with Value of Zero"
  },
  {
    "op": "replace",
    "path": "/runtime",
    "value": "python3.13"
  }
]

Code Samples#

curl -X PATCH 'https://api.app.wdesk.com/scripts/{scriptId}' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer {access-token}' \
    -H 'X-Version: 2026-09-01.scripting.preview' \
    --data-raw '[{"op":"replace","path":"/description","value":"Hide All Rows with Value of Zero"},{"op":"replace","path":"/runtime","value":"python3.13"}]'
echo '[{"op":"replace","path":"/description","value":"Hide All Rows with Value of Zero"},{"op":"replace","path":"/runtime","value":"python3.13"}]' | http PATCH https://api.app.wdesk.com/scripts/{scriptId} \
    X-Version:2026-09-01.scripting.preview \
    Content-Type:application/json \
    Accept:application/json \
    Authorization:"Bearer {access-token}"
wget --method=PATCH "https://api.app.wdesk.com/scripts/{scriptId}" \
    --output-document - \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer {access-token}' \
    --header 'X-Version: 2026-09-01.scripting.preview' \
    --body-data='[{"op":"replace","path":"/description","value":"Hide All Rows with Value of Zero"},{"op":"replace","path":"/runtime","value":"python3.13"}]'
import requests

headers = {
  'X-Version': '2026-09-01.scripting.preview',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

body = [
  {
    "op": "replace",
    "path": "/description",
    "value": "Hide All Rows with Value of Zero"
  },
  {
    "op": "replace",
    "path": "/runtime",
    "value": "python3.13"
  }
]

r = requests.patch('https://api.app.wdesk.com/scripts/{scriptId}', headers = headers, json=body)

print(r.json())

Returns#

200 - OK#

Returns a Script object containing details about the updated Script.

400 - Bad Request#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

401 - Unauthorized#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

403 - Forbidden#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

404 - Not Found#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

429 - Too Many Requests#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

500 - Internal Server Error#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

503 - Service Unavailable#

Error response that indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Example Responses#

{
  "created": {
    "dateTime": "2026-05-13T20:41:35Z"
  },
  "description": "Checks each row in a spreadsheet and hides rows with a value of zero",
  "id": "ae82b647-8e43-44c3-a4e7-2aa3294c87ac",
  "modified": {
    "dateTime": "2026-07-07T18:31:54Z"
  },
  "name": "Hide All Rows with Value of Zero",
  "runtime": "python3.13",
  "state": "active"
}
{
  "code": "400BadRequest",
  "message": "The request was unacceptable, often due to a missing or invalid parameter"
}
{
  "code": "401Unauthorized",
  "message": "No valid API token provided"
}
{
  "code": "403Forbidden",
  "message": "The API token does not have permissions to perform the request"
}
{
  "code": "404NotFound",
  "message": "The requested resource could not be found"
}
{
  "code": "429TooManyRequests",
  "message": "Too many requests have been made against the API in too short a time"
}
{
  "code": "500InternalServerError",
  "message": "The server encountered an unexpected condition that prevented it from fulfilling the request"
}
{
  "code": "503ServiceUnavailable",
  "message": "The server cannot handle the request due to a temporary overload or scheduled maintenance"
}