Recipe lifecycle management

Quick reference

Type Resource Description
POST /api/packages/export/:manifest_id Export package based on a manifest.
POST /api/packages/import/:folder_id Import package into a folder.
GET /api/packages/:id Get package by ID.
GET /api/packages/:id/download Download a package.

Export package based on a manifest

Export package based on a manifest.

POST /api/packages/export/:id

This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package.

URL parameters

Name Type Description
id string
required
Export manifest ID.

Sample request

curl  -X POST https://workato.com/api/packages/export/<manifest_id> \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

Response

{  
   "id":242,
   "operation_type":"export",
   "status":"completed",
   "export_manifest_id":3,
   "download_url":"https://workato-staging-assets,com/packages/zip_files/000/000/242/original/exportdemo.zip"
}

Import package into a folder

Import a package (zip file) into a folder.

POST /api/packages/import/:id

This is an asynchronous request. Use GET package by ID 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 should be true if the running recipes need to be restarted upon import.

URL parameters

Name Type Description
id string
required
Folder ID.
restart_recipes boolean
optional
If true, it will allow the restarting of running recipes.

Sample request

curl  -X POST https://workato.com/api/packages/import/<folder_id>?restart_recipes=true \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>' \
      -H 'Content-Type: application/octet-steam' \
      -F 'path/to/local/file.zip'

Response

{  
   "id":251,
   "operation_type":"import",
   "status":"completed",
   "download_url":"https://workato-staging-assets,com/packages/zip_files/000/000/242/original/exportdemo.zip"
}

Get package by ID

Get details of an imported or exported package.

GET /api/packages/:id

URL paramters

Name Type Description
id string
required
Package ID.

Sample request

curl  -X GET https://workato.com/api/packages/<package_id> \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

Response

  • This shows a successful export.
{  
   "id":242,
   "operation_type":"export",
   "status":"completed",
   "export_manifest_id":3,
   "download_url":"https://workato-staging-assets,com/packages/zip_files/000/000/242/original/exportdemo.zip"
}
  • This shows a packages that failed to export properly.
{  
   "id":242,
   "operation_type":"export",
   "status":"failed",
   "error":"error_message"
   "export_manifest_id":4,
   "download_url":"null"
}

Download package

Downloads a package.

GET /api/packages/:id/download

URL parameters

Name Type Description
id string
required
Package ID.

Sample request

curl  -X GET https://workato.com/api/packages/<package_id>/download \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

Response

If successful, you will be redirected to the package content. Returns 404 if package not found or doesn't have content.

results matching ""

    No results matching ""