Assigned use for a workflow

When your organization uses a subscription license for Nintex Workflow for Office 365, development workflows are available in addition to production workflows.

Development workflows look and behave differently from production workflows. When you view or edit a development workflow, you can see a development workflow watermark on the designer canvas in the Workflow designer.

When you publish a workflow on a tenant using a subscription license, the workflow settings-configured publish type is used: either development or production.

The assigned use endpoint allows you to change the entitlement value of the workflow from development to production, or back from production to development. Change the assigned use of a Nintex workflow that has been saved to a SharePoint list. You can use the end point and the workflow ID.

Request

Method Request URI HTTP Version
Put endpointURL/api/v1/workflows/workflowId/assigneduse HTTP/1.1

Request Parameters

Request Parameter Description
endpointURL Required. The endpoint URL for the REST API. For more information about the endpoint URL, see "Endpoint URL" above.

Request Headers

The following table describes required and optional request headers.

Request Header Description
Accept Required. application/json
Authorization Required. Follows the following format: cookie <SharePoint site URL> SPOIDCRL=77u/PD94 ... You can construct your authorization key with a PowerShell script. For more information, see Authentication and authorization.
Api-Key Required. The key will be 22 characters long key provided by Nintex. For more information, see For more information, see Authentication and authorization.
Content-Type Required. application/json

Request Body

An object, serialized in JavaScript Object Notation (JSON), which contains the following properties:

Property Data type Description
value string

Entitlement has two valid values:

  • Production

    Production workflows do not have a development workflow watermark on the design canvas in the Workflow designer.

  • Development

    Product forms have a development workflow watermark on the design canvas in the Workflow designer.

Response

The response includes an HTTP status code, response headers, and a response body.

Response Codes

Code Description
200 The specified workflow entitlement was updated.
400 An invalid operation has occurred.
401 An invalid request body was specified.
404 The specified list could not be found.
500 Internal error.

Response Headers

The following table describes response headers returned by a successful response. Other header values may also be returned, depending on SharePoint and ASP.NET configurations.

Request Header Description
Content-Type application/xml; charset=utf-8
Content-Type The length, in characters, of the response body.
Cache-Control private

Response Body

If the method was successful, a JSON-serialized object is returned that contains the following properties:

Property Data type Description
{ } string If the assigned use was workflow was successfully updated, a response body is returned.
Id string The workflowID.

_links

list

The list contains the rel, href, and IsTemplated property.

rel string Contains the relative reference for the assigned use such as self and the workflow package.
href string The HTTP reference for the object.
IsTemplated Boolean Indicates if the workflow is templated.

Otherwise, depending on the error, the method returns additional information about the error. For example, if the value of the listId property in the request body is set to a name or identifier that cannot be found on the SharePoint site, the response returns an HTTP 400 status code and a Request Error web page in which the error indicates that a list with the specified name does not exist.

Example

The following example demonstrates how to use this operation to change the assigned use for a Nintex workflow for a SharePoint list.

Request

The following PUT request attempts to change the assigned use for a Nintex workflow.

https://crestan.nintexo365.com/api/v1/workflows/DB0ECEE6-117D-4519-986E-020A9BE6A7E3/assigneduse

Request Body

The following request body contains a JSON object in which the listId property is set to the identifier of the SharePoint list from where to publish the workflow definition. The contentTypeId property is not specified.

{

    "value": "production"

}

Response

An HTTP 200 response code is returned, indicating that the assigned use for the workflow was successfully changed.

Response Body

The following response body contains the default view URL for the specified SharePoint list.

{
  "id": "f3e88c1d-307a-4d98-9991-0e993f1adbc8",
  "_links": [
    {
      "rel": "self",
      "href": "/api/v1/workflows/f3e88c1d-307a-4d98-9991-0e993f1adbc8/assigneduse",
      "isTemplated": false
    },
    {
      "rel": "workflow.package.export",
      "href": "/api/v1/workflows/packages/f3e88c1d-307a-4d98-9991-0e993f1adbc8",
      "isTemplated": false
    }
  ]

}    

Related Information

Saving workflows

Publishing workflows

API Reference