Create Script

Last modified 05 Dec 2025 09:56 +01:00

Create scripts are used to determine how to create new objects using the target system’s API.

Basic Create Script Example using POST

The simplest create script for User object class could look like this:

objectClass("User") {
    create {
        endpoint(POST, "/users") {
            request {
                contentType APPLICATION_JSON
            }
        }
    }
}

Where:

  • this simplest script heavilly relies on default behavior of connector framework.

  • The endpoint method specifies the endpoint to be used for create operation.

  • The httpOperation method specifies the HTTP method to be used.

  • The request method allows to customize the request. In this case we specify that the content type of the request is JSON.

    • If no body implementation is specified, the default implementation will be used which will serialize all creatable attributes from the objectClass into JSON body.

    • If no response is specified, the response will be handled by default implementation which expects that the created object is returned in the response body in JSON format.

    • Attributes which are updateable but not creatable will be automatically handled by the framework after the object is created, by issuing an update operation (if implemented) immediately after the create operation.

Was this page helpful?
YES NO
Thanks for your feedback