Response bodies

The responses provided by operations in the Nintex Workflow for Office 365 REST API typically use one of two objects to represent the response body of the response. If an operation was successful, the response body contains a Message object that represents the information returned by the operation. Otherwise, the response body contains an Error object, which provides information about the error response.

Message

The Message object represents the response body of a successful response returned by an operation. The object can provide information about the identifier, data, and metadata about the successful response, as well as links to other operations relevant to the successful response.

Properties

Name Type Nullable Description
data varies true If specified, the data returned by the operation.
metadata varies true If specified, the metadata returned by the operation.
id string true If specified, the identifier returned by the operation.
_links array true If specified, an array of Link objects, representing relative links to other REST operations relevant to the operation. For more information about the Link object, see Data types.

Remarks

When an operation returns a successful response, the content of the response varies, depending on the operation itself. For more information about the contents of a response body for a successful response from an operation, see the documentation for that operation.

Example

The following example describes the response body of a successful response received while attempting to import a workflow to a SharePoint site. For more information about importing a new workflow, see Import into a new workflow. The id property provides the identifier of the new workflow, and the _links property provides links to relevant operations, relative to the new workflow.

{
  "id": "fd4f1cd2-7ea7-4b62-9751-0ff83ab609f7",
  "_links": [
    {
      "rel": "self",
      "href": "{?migrate}",
      "isTemplated": true
    },
    {
      "rel": "export",
      "isTemplated": false
    },
    {
      "rel": "publish",
      "isTemplated": false
    }
  ]
}

Error

The Error object represents the response body of an error response returned by an operation. The object can provide information about the SharePoint correlation ID for the error, internal error code, and additional information about the error response, as well as links to other operations relevant to the error response.

Properties

Name Type Nullable Description
code string true If specified, the internal error code of the error. For more information about error subcodes, see Common status and error codes.
correlationId string false The correlation ID of the error.
message string true If specified, the description of the error.
moreInfo string true If specified, a string that represents a URI which can provide additional information about the error.
_links array true If specified, an array of Link objects, representing relative links to other REST operations relevant to the error. For more information about the Link data type, see Data types.

Remarks

When an error is encountered by an operation in the Nintex Workflow for Office 365 REST API, this type can return an internal error code in code. The internal error code represents either a common error code for the Nintex Workflow for Office 365 API, or a specific error code for that operation. For more information about error codes specific to an operation, see the documentation for that operation. For more information about error codes common to all operations in Nintex Workflow for Office 365, see Common status and error codes.

Example

The following example describes the response body of an error response received while attempting to export a workflow that does not exist from a SharePoint site. For more information about exporting a workflow, see Export a workflow. The code property contains the internal Nintex error code, and the message property describes the error.

{
  "correlationId": "ad2bb746-7f45-4306-9019-bbccc0ca99a2",
  "code": "NW-1001",
  "message": "The specified workflow could not be found."
}

Related Information

API Reference