Save into a workflow

Saves the contents of a Nintex Workflow for Office 365 export (.nwp) file into the specified existing workflow.

Request

Method Request URI HTTP Version
PUT https://{baseURL}/api/v1/workflows/{id} HTTP/1.1

Request Parameters

Request Parameter Description

baseURL

Required. The base URL for the Nintex Workflow for Office 365 REST API. For more information about the base URL, see Base URL.

id

Required. The identifier of the workflow to be saved.

Request Headers

This operation uses only common request headers. For more information about common request headers, see Common headers.

Request Body

This operation uses the contents of an export file, represented as a Base64-encoded binary value, in the request body.

Response

This operation returns an HTTP status code, response headers, and a response body.

Response Codes

This operation returns only common HTTP status codes. For more information about common HTTP status codes returned by all operations, see Common status and error codes.

Response Headers

This operation returns only common response headers. For more information about common response headers returned by all operations, see Common headers.

Response Body

If the operation was successful, the response body contains a Message object that represents the information returned by the operation about the saved workflow. Otherwise, the response body contains an Error object, which provides information about the error response. For more information about the Message and Error objects, see Response bodies.

For a successful response, the id property of the Message object represents the identifier of the saved workflow, and the _links property contains links to other relevant operations for the saved workflow, relative to the SharePoint site.

Remarks

Use this operation to overwrite an existing site workflow or list workflow in a SharePoint site by replacing the contents of the workflow with the contents of an existing export file. This operation is equivalent to the operation for importing into an existing workflow, except that there is no opportunity to migrate the workflow and, in the case of an export file that contains a list workflow, the SharePoint list specified in the export file cannot be overridden. For more information about importing an existing workflow, see Import into an existing workflow.

If the export file includes form definitions for custom Nintex task forms used by workflow actions, the form definitions are ignored by the operation if the destination does not support Nintex Forms integration; otherwise, the operation saves the form definitions.

To support Nintex Forms integration, Nintex Forms for Office 365 version 1.2.1.0 or greater must be installed.

If this operation is successful, the workflow must be published before it can be used, even if it was published prior to performing the operation.

Example

The following example demonstrates how to use this operation to save into an existing workflow from an export file.

Request

The following PUT request attempts to save into an existing workflow from an export file specified in the request body.

https://crestan.nintexo365.com/workflows/99777373-a65a-4f49-af7a-f28c2f33a0a8

Request Body

The request body for the example contains a Base64-encoded binary value that represents the contents of the export file to be imported.

Response

An HTTP 200 response code is returned, indicating that the existing workflow was successfully saved.

Response Body

The response body contains the following Message object, in which the identifier for the saved workflow is specified in the id property and the operations relevant to the saved workflow are described in the _links property.

{
  "id": "99777373-a65a-4f49-af7a-f28c2f33a0a8",
  "_links": [
    {
      "rel": "self",
      "href": "/api/v1/workflows/99777373-a65a-4f49-af7a-f28c2f33a0a8",
      "isTemplated": false
    },
    {
      "rel": "workflow.package.export",
      "href": "/api/v1/workflows/packages/99777373-a65a-4f49-af7a-f28c2f33a0a8",
      "isTemplated": false
    },
    {
      "rel": "workflow.publish",
      "href": "/api/v1/workflows/99777373-a65a-4f49-af7a-f28c2f33a0a8/published",
      "isTemplated": false
    }
  ]
}

Related Information

Saving workflows

Publishing workflows

API Reference