Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

https://www.googleapis.com/auth/userinfo.email
google_id_token-a99f12e0

View your email address

https://www.googleapis.com/auth/userinfo.email
google_id_token_legacy-a99f12e0

View your email address

Path Parameters

libId
string
required

The ID of the library

Query Parameters

domain
string

The G Suite domain

securityCode
string

The security code

Body

application/json
async
boolean

Whether the script will be executed as an asynchronous task (JAVA only - Default: false)

code
object

The script code by method/function identifier

createdTime
string<date-time>

The time at which the custom script was created (read-only field)

id
string

The ID of the custom script (read-only field)

imports
string[]

The full list of imports used in the script (JAVA only)

kind
string
language
enum<string>

The language of the script which depends on the type (read-only field)

Available options:
JAVA,
JAVASCRIPT
lastModifiedTime
string<date-time>

The last time the custom script was modified by anyone (read-only field)

libraryId
string

The ID of the library (read-only field)

name
string

The name of the custom script

parameters
object[]

The list of arbitrary parameters that can be used in the script code

predefined
boolean

Whether the script is a predefined read-only script - (read-only field)

runAs
enum<string>

The permission context in which the script will be executed (JAVA only - Possible values: RUN_AS_SYSTEM, RUN_AS_USER - Default: RUN_AS_USER)

Available options:
RUN_AS_SYSTEM,
RUN_AS_USER
type
enum<string>

The type of the script, set during creation (Possible values: RELATION_FILTER, RELATION_RENDER, UPDATE, VIEWER, WORKFLOW_TRANSITION, REMINDER_CONDITION). Affects available methods.

Available options:
RELATION_FILTER,
RELATION_RENDER,
UPDATE,
VIEWER,
WORKFLOW_TRANSITION,
REMINDER_CONDITION

Response

200 - application/json

A ApiCustomScriptCompilationResponse response

compilationResult
enum<string>
Available options:
SUCCESS,
FAILURE
errorMessage
string
kind
string