Scripts#

Endpoints to manage scripts

ContentDownloadResponse#

Contains a pre-signed url that can be used to download the script source content.

Properties#

Name

Type

Description

Restrictions

downloadUrl

string

The URL to make a GET request to, to download the script source content. This is a temporary URL; it should be used immediately when the response is received.

Example#

{
  "downloadUrl": "string"
}

RunLogsDownloadResponse#

Contains a pre-signed url that can be used to download the run logs.

Properties#

Name

Type

Description

Restrictions

downloadUrl

string

The URL to make a GET request to, to download the run logs. This is a temporary URL; it should be used immediately when the response is received.

Example#

{
  "downloadUrl": "string"
}

RunOutputDownloadResponse#

Contains a pre-signed url that can be used to download the run output.

Properties#

Name

Type

Description

Restrictions

downloadUrl

string

The URL to make a GET request to, to download the run output. This is a temporary URL; it should be used immediately when the response is received.

Example#

{
  "downloadUrl": "string"
}

Script#

Details about the script, including its ID, name, and milestone dates.

Properties#

Name

Type

Description

Restrictions

created

Action

When the action was performed, and details about the user who did it

read-only

description

string

Description of the script

id

string

The unique identifier of the script

read-only

modified

Action

When the action was performed, and details about the user who did it

read-only

name

string

Name of the script

required

runtime

string

The runtime execution environment for the script.

Enumerated Values#

Property

Value

runtime

python3.9

runtime

python3.13

Example#

{
  "description": "Checks each row in a spreadsheet and hides rows with a value of zero",
  "name": "Hide Rows with Value of Zero",
  "runtime": "python3.13"
}

ScriptExecution#

The properties to make available to a script run as environment variables. All property names formatted as Camel case (camelCase), Pascal case (PascalCase), Snake case (snake_case) and Kebab case (kebab-case) are converted to capitalized Snake case. For example, a property name of apiKey becomes API_KEY. Values must be strings.

Properties#

None

Example#

{
  "SpreadsheetId": "9ba1b5dfbd3b4c8997f309fa61180b87",
  "apiKey": "Az86pm34xyz",
  "has-changed": "true",
  "row_number": "27"
}

ScriptRun#

Details about the run, including its ID, name, and milestone dates.

Properties#

Name

Type

Description

Restrictions

completed

Action¦null

When the action was performed, and details about the user who did it

read-only

created

Action

When the action was performed, and details about the user who did it

read-only

failureReason

string¦null

Reason that the run failed

read-only

id

string

The unique identifier of the script being run

read-only

runtime

string

The runtime environment in which the run executed.

read-only

started

Action¦null

When the action was performed, and details about the user who did it

read-only

status

string

The status of the script

read-only

Enumerated Values#

Property

Value

runtime

python3.9

runtime

python3.13

status

acknowledged

status

queued

status

started

status

completed

status

cancelled

status

failed

status

python-failed

Example#

{
  "completed": {
    "dateTime": "2019-10-30T15:03:27Z",
    "user": {
      "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
    }
  },
  "created": {
    "dateTime": "2019-10-30T15:03:27Z",
    "user": {
      "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
    }
  },
  "failureReason": "string",
  "id": "ae82b647-8e43-44c3-a4e7-2aa3294c87ac",
  "runtime": "python3.13",
  "started": {
    "dateTime": "2019-10-30T15:03:27Z",
    "user": {
      "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
    }
  },
  "status": "acknowledged"
}

ScriptRunsListResult#

Returns a JSON object with data and @nextLink properties. data contains a list of ScriptRun objects, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn’t appear. If the request returns no results at all, data contains an empty array.

Properties#

Name

Type

Description

Restrictions

@nextLink

string

Pagination link for next set of results

data

[ScriptRun]

Details about the run, including its ID, name, and milestone dates.

required

Example#

{
  "@nextLink": "<opaque_url>",
  "data": [
    {
      "completed": {
        "dateTime": "2019-10-30T15:03:27Z",
        "user": {
          "displayName": "John Doe",
          "email": "string",
          "firstName": "John",
          "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD",
          "lastName": "Doe",
          "userName": "string"
        }
      },
      "created": {
        "dateTime": "2019-10-30T15:03:27Z",
        "user": {
          "displayName": "John Doe",
          "email": "string",
          "firstName": "John",
          "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD",
          "lastName": "Doe",
          "userName": "string"
        }
      },
      "failureReason": "string",
      "id": "ae82b647-8e43-44c3-a4e7-2aa3294c87ac",
      "runtime": "python3.13",
      "started": {
        "dateTime": "2019-10-30T15:03:27Z",
        "user": {
          "displayName": "John Doe",
          "email": "string",
          "firstName": "John",
          "id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD",
          "lastName": "Doe",
          "userName": "string"
        }
      },
      "status": "acknowledged"
    }
  ]
}

ScriptsListResult#

Returns a JSON object with data and @nextLink properties. data contains a list of Script objects, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn’t appear. If the request returns no results at all, data contains an empty array.

Properties#

Name

Type

Description

Restrictions

@nextLink

string

Pagination link for next set of results

data

[Script]

Details about the script, including its ID, name, and milestone dates.

required

Example#

{
  "@nextLink": "<opaque_url>",
  "data": [
    {
      "description": "Checks each row in a spreadsheet and hides rows with a value of zero",
      "name": "Hide Rows with Value of Zero",
      "runtime": "python3.13"
    }
  ]
}

ScriptSource#

Details about the source, including its ID and path.

Properties#

Name

Type

Description

Restrictions

id

string

The unique identifier of the source

read-only

path

string

The path of the source (including the name)

Example#

{
  "id": "ae82b647-8e43-44c3-a4e7-2aa3294c87ac",
  "path": "/hide_values.py"
}

ScriptSourceContentUploadResponse#

Contains a pre-signed url that can be used to upload content to a source. The Location header also contains a url for an Operation that can be polled to find out if the upload was successful.

Properties#

Name

Type

Description

Restrictions

uploadUrl

string

The URL to make a PUT request to, to upload the source. Include the source content as the body of the request. This is a temporary URL; it should be used immediately when the response is received.

Example#

{
  "uploadUrl": "string"
}

ScriptSourcesListResult#

Returns a JSON object with data and @nextLink properties. data contains a list of ScriptSource objects, and @nextLink provides the URL to the next set of results. If there are no additional results, @nextLink doesn’t appear. If the request returns no results at all, data contains an empty array.

Properties#

Name

Type

Description

Restrictions

@nextLink

string

Pagination link for next set of results

data

[ScriptSource]

Details about the source, including its ID and path.

required

Example#

{
  "@nextLink": "<opaque_url>",
  "data": [
    {
      "id": "ae82b647-8e43-44c3-a4e7-2aa3294c87ac",
      "path": "/hide_values.py"
    }
  ]
}