createFunctionProduction( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a function production.

This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about function creation.

You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.

Note: Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.

Once created, all parts of the function production can be updated using the Update Function Production method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.

Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Manage Functions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
functionProductionFunctionProductionRequired

Function production to create.

Returns
Return Type:Promise<FunctionProduction>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?