Import a script

Uploads a script document as the file part and stores it UNPUBLISHED. Its code body is compiled under a restricted allow-list, and the document is stored exactly as uploaded.

Importing a script does not run it. It runs once it has been published and an automation binds it to a trigger.

Body Params
string
required
length between 3 and 50

Unique per tenant, and checked for uniqueness before any other validation. ASCII letters (a-z, A-Z), digits, spaces, hyphens and underscores only, so accented letters are rejected. No leading or trailing space, and no consecutive separators (__, --, _-, -_).

string
length ≤ 250

Optional. UTF-8; letters/digits/punctuation/spaces only. Script-injection patterns (<script, </script>, javascript:, onerror=, onload=, alert() are rejected.

Stored normalised: runs of whitespace collapse to a single space, and the result is trimmed. The response returns the normalised value.

file
object
required

The script document (non-empty, max 50 KB): a YAML file declaring triggerType, a trigger block, a params list and a Groovy code body. Only code is compiled. Sent as a file part, so the shape below describes the YAML inside it rather than a JSON body.

Headers
string
^\d+\.\d+\.\d+$

Version of the API contract the client targets, in MAJOR.MINOR.PATCH format. Mandated by the Gateway standard. Not yet enforced: requests without the header, or with an unsupported value, are currently processed normally. Once enforcement is enabled, such requests will be rejected with 400 Bad Request.

string
required
length ≥ 1

Required on every POST, PUT and PATCH. A client-generated key: retrying with the same key returns the original response without running the request again. Scoped per tenant, user, method and path. A missing or blank key is rejected with 400.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json