Create a Groovy endpoint
Groovy endpoints allow you to run Groovy scripts.
In the "Groovy Script Selection" dialog step, you have access to the familiar Groovy features. There, you can open the Groovy editor and either create a Groovy file directly or import an existing file.
Methods
Please note that specifying the method for Groovy endpoints is (only) for informational purposes. So, for example, if you use POST, you should do so when the triggered Groovy script writes a record or, more generally, "generates" something. Or use GET if you want the Groovy script to return a value.
For Groovy endpoints, specifying the method has no effect. It is intended (solely) to help API users or consumers gain a good understanding of the API endpoint.
The following methods are available for the Groovy API endpoints:
-
GET
-
POST
-
PUT
-
PATCH
-
DELETE
JSON Body
The Groovy endpoints do not include the dialog steps for creating a JSON body. You must include the appropriate response body or request body in the Groovy script.
Overview of the Following Sections
In the following section, you'll find instructions for creating a Groovy endpoint using the POST method.