Get Form

Retrieves the definition of the Nintex form as NFP for the specified SharePoint list and content type. The Nintex Forms Package (NFP) file is a ZIP file with the extension .NFP that contains the configuration settings, variables, lists, content types and columns for a Nintex form. The file is backwards compatible for with the legacy Form.XML files exported from previous version of Nintex Forms designer.

Note: This API supports forms designed using the Classic Forms and Responsive Forms designers. Forms designed using the New Responsive Forms designer are not supported.

Request

Method Request URI HTTP Version
GET {baseURL}/api/v1/forms/{listId},{contentTypeId} 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.

listId

Required. The name or identifier of the SharePoint list or document library.

contentTypeId

Optional. The name or identifier of the SharePoint content type. If a value is not specified, the first content type defined for the list specified in listId is used.

Request Headers

The following table describes required and optional request headers.

Request Header Description
Content-Type Optional. application/json
Authorization Required. SharePoint form digest value, used to authenticate the request.

Request Body

None.

Response

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

Response Codes

Code Description
200 The specified form archive (nfp) was retrieved.
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/nfp
Content-Type The length, in characters, of the response body.
Cache-Control private

Response Body

If the method was successful, a binary object is returned that contains the following properties:

Property Content type Description
attachment; filename=NFForm.nfp application/zip A file archive containing the Nintex form definition files.

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.

Remarks

This method is implemented so that message bodies for requests must be provided as wrapped JSON, but message bodies for responses are provided as a binary file with an NFP file extension.

Example

The following example demonstrates how to use this operation to retrieve a Nintex form for a SharePoint list.

Request

The following GET request attempts to retrieve a Nintex form.

https://crestan.nintexo365.com/api/v1/forms/b7fea5eb-db3c-45f5-b590-ddcd0b12bd4e,0x0100B309C5747F21F94A9FBBAA82DB92F184

Request Body

None.

An HTTP 200 response code is returned, indicating that the form was successfully retrieved, and a response body containing the NFP file.

Response Body

The following XML body is the manifest that lists the contents of the NFP archive.

<?xml version="1.0" encoding="utf-8"?>

<Manifest version="2.0.1">

  <Contents>

    <File name="FormLayouts" path="Form\FormLayouts.xml" hash="3010021C98ACD0D084B482505A8B1FE626541475" />

    <File name="FormSettings" path="Form\FormSettings.xml" hash="0BDEED88C82D26D4AF698C698BB4FD672098B6A2" />

    <File name="FormControls" path="Form\FormControls.xml" hash="45E589D6F39637C082FA64343F26071C3163AC88" />

    <File name="FormStyles" path="Form\FormStyles.xml" hash="76DF2ADF46F837ABCA8F63E08B8EE930C4A50402" />

    <File name="FormScripts" path="Form\FormScripts.xml" hash="D96DE89E4328B31151CA07AE55209B0BE4E1198D" />

    <File name="FormRules" path="Form\FormRules.xml" hash="BF2793DD750471051CCC5E319FF6E04F911DA1C8" />

    <File name="FormUserVariables" path="Form\FormUserVariables.xml" hash="C4DF8D5BBFF66675435FE0AC55D1F893E9FFB8CA" />

    <File name="FormLiveSettings" path="Form\FormLiveSettings.xml" hash="1B86D8DD58E7D4363D88D6E68865E0E4878044CF" />

  </Contents>

  <Properties>

     <Property name="Created">2016-01-08T23:45:19.5583206+00:00</Property>

  </Properties>

</Manifest>

Related information

Assigned use for Forms

Import Form

Publish Form

Save Form

Delete Form