# Recipe lifecycle management
The endpoints listed below are Workato Embedded vendor only endpoints for importing a package into a customer account.
The APIs for exporting a package are available here. If you wish to import packages into your own environments (not customer accounts), please use the endpoints listed in the Workato API page as well.
# Quick reference
Type | Resource | Description |
---|---|---|
POST | api/managed_users/:id/imports | Import package into a folder in a customer account. |
GET | api/managed_users/:id/recipes | Get status of an imported package. |
# Import package into a customer account
Import a package into a specified folder in a customer account.
POST /api/managed_users/:id/imports
This is an asynchronous request. Use the Get package status endpoint to get details of the imported the package.
The input (zip file) is a application/octet-stream
payload containing package content. URL parameter restart_recipes must be set to true
if the running recipes need to be restarted upon import.
# URL parameters
Name | Type | Description |
---|---|---|
managed_user_id | string required | Workato Embedded customer Account ID/External ID. External ID must be prefixed with an E(eg: EA2300) and the resulting ID should be URL encoded. |
folder_id | string required | Folder ID. |
restart_recipes | boolean optional | Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. |
# Sample request
curl -X POST https://www.workato.com/api/managed_users/91928/imports?folder_id=1827 \
-H 'x-user-email: <email>' \
-H 'x-user-token: <token>' \
-H 'Content-Type: application/octet-stream' \
-F 'path/to/local/file.zip'
# Response
{
"id":251,
"operation_type":"import",
"status":"completed"
}
# Get package status
Get details of a package imported into a customer account.
GET /api/managed_users/:id/imports/:package_id
# URL paramters
Name | Type | Description |
---|---|---|
managed_user_id | string required | Workato Embedded customer Account ID/External ID. External ID must be prefixed with an E(eg: EA2300) and the resulting ID should be URL encoded. |
package_id | string required | Package ID. |
# Sample request
curl -X GET https://www.workato.com/api/managed_users/91829/imports/198 \
-H 'x-user-email: <email>' \
-H 'x-user-token: <token>'
# Response
- This shows a successful import.
{
"id":198,
"operation_type":"import",
"status":"completed"
}
- This shows a package that failed to import properly.
{
"id":198,
"operation_type":"export",
"status":"failed",
"error":"error_message"
}
←
Recipes