REST API - Accessing Forms

Version 2

    The REST API provides access to retrieve Forms from your install.

     

    Accessing Forms

    • GET  /assets/form/{id}?depth={depth}

     

    Response

    The response for this call looks as follows :

     

    {
      "type": "Form",
      "currentStatus": "Draft",  "id": "1712",
      "createdAt": "1358345168",
      "createdBy": "340",
      "depth": "complete",
      "folderId": "7",
      "name": "fsTest",
      "permissions": "fullControl",
      "updatedAt": "1358345168",
      "updatedBy": "340",
      "elements": [
        {
          "type": "FormField",
          "x_e10_formFieldClass": "_100",
          "x_e10_formFieldStyle": "{\"float\":\"left\",\"width\":\"96%\",\"margin-right\":\"2%\",\"margin-left\":\"2%\"}",
          "x_e10_createdAt": "1358345169",
          "x_e10_createdBy": "340",
          "id": "10182",
          "name": "Email Address",
          "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
          "createdFromContactFieldId": "100001",
          "dataType": "text",
          "displayType": "text",
          "fieldMergeId": "126",
          "htmlName": "emailAddress",
          "validations": [
            
          ]
        }
      ],
      "emailAddressFormFieldId": "10182",
      "html": "<div><form method=\"post\" name=\"untitledForm-1358345137532\" action=\"https:\/\/s1664.t.eloqua.com\/e\/f2\" id=\"form-500002\" ><input value=\"untitledForm-1358345137532\" type=\"hidden\" name=\"elqFormName\"  \/><input value=\"1664\" type=\"hidden\" name=\"elqSiteId\"  \/><input name=\"elqCampaignId\" type=\"hidden\"  \/><div id=\"formElement0\" class=\"sc-view form-design-field sc-static-layout sc-regular-size\" style=\"left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 6px 5px 9px 9px\" ><div class=\"field-wrapper\" style=\"float: left; width: 100%; clear: both\" ><div class=\"_100\" style=\"float: left; width: 96%; margin-right: 2%; margin-left: 2%\" ><p style=\"position: relative; margin: 0px; padding: 0px\" ><label for=\"emailAddress\" style=\"display: block; line-height: 150%; padding: 1px 0pt 3px; white-space: nowrap\" >Email Address<\/label><input id=\"field0\" name=\"emailAddress\" type=\"text\" value=\"<eloqua type='emailfield' syntax='Birthday11' \/>\" style=\"width: 100%\"  \/><\/p><\/div><\/div><\/div><div id=\"formElement1\" class=\"sc-view form-design-field sc-static-layout sc-regular-size\" style=\"left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 6px 5px 9px 9px\" ><div class=\"field-wrapper\" style=\"float: left; width: 100%; clear: both\" ><div class=\"_100\" style=\"float: left; width: 96%; margin-right: 2%; margin-left: 2%\" ><p style=\"position: relative; margin: 0px; padding: 0px\" ><label for=\"firstName\" style=\"display: block; line-height: 150%; padding: 1px 0pt 3px; white-space: nowrap\" >First Name<\/label><input id=\"field1\" name=\"firstName\" type=\"text\" value=\"<eloqua type='emailfield' syntax='Arsenal_First_Name1' \/>\" style=\"width: 100%\"  \/><\/p><\/div><\/div><\/div><div id=\"formElement2\" class=\"sc-view form-design-field sc-static-layout sc-regular-size\" style=\"left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 6px 5px 9px 9px\" ><div class=\"field-wrapper\" style=\"float: left; width: 100%; clear: both\" ><div class=\"_100\" style=\"float: left; width: 96%; margin-right: 2%; margin-left: 2%\" ><p style=\"position: relative; margin: 0px; padding: 0px\" ><label for=\"lastName\" style=\"display: block; line-height: 150%; padding: 1px 0pt 3px; white-space: nowrap\" >Last Name<\/label><input id=\"field2\" name=\"lastName\" type=\"text\" value=\"<eloqua type='emailfield' syntax='LastName' \/>\" style=\"width: 100%\"  \/><\/p><\/div><\/div><\/div><div id=\"formElement3\" class=\"sc-view form-design-field sc-static-layout sc-regular-size\" style=\"left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 6px 5px 9px 9px\" ><div class=\"field-wrapper\" style=\"float: left; width: 100%; clear: both\" ><div class=\"_100\" style=\"float: left; width: 96%; margin-right: 2%; margin-left: 2%\" ><p style=\"position: relative; margin: 0px; padding: 0px\" ><input type=\"submit\" value=\"Submit\" style=\"font-size: 100%; height: 24px; width: 100px\"  \/><\/p><\/div><\/div><\/div><\/form><script src=\"https:\/\/img.en25.com\/i\/livevalidation_standalone.compressed.js\" type=\"text\/javascript\" ><\/script><style type=\"text\/css\" media=\"screen\" >.LV_validation_message{ font-weight:bold; margin: 0 0 0 5px; }\u000a.LV_valid{ color:#00CC00; display:none; }\u000a.LV_invalid{ color:#CC0000; font-size:10px; }\u000a.LV_valid_field, input.LV_valid_field:hover, input.LV_valid_field:active, textarea.LV_valid_field:hover, textarea.LV_valid_field:active { border: 1px solid #00CC00; }\u000a.LV_invalid_field, input.LV_invalid_field:hover, input.LV_invalid_field:active, textarea.LV_invalid_field:hover, textarea.LV_invalid_field:active { border: 1px solid #CC0000; }<\/style><script type=\"text\/javascript\" >var field0 = new LiveValidation(\"field0\", {validMessage: \"\", onlyOnBlur: true});var field1 = new LiveValidation(\"field1\", {validMessage: \"\", onlyOnBlur: true});var field2 = new LiveValidation(\"field2\", {validMessage: \"\", onlyOnBlur: true});<\/script><\/div>",
      "htmlName": "untitledForm-1358345137532",
      "processingSteps": [
        
      ],
      "processingType": "externalWebsite",
      "size": {
        "type": "Size",
        "width": "0",
        "height": "0"
      },
      "style": "{\"fieldSize\":\"medium\",\"labelPosition\":\"top\"}"
    }
     

     

    Properties

     

    Name

    Type

    Description

    Notes

    Validations

    type"Form"
    elementsList of FormElement
    emailAddressFormFieldIdintegerIdRequirement
    htmlstring
    htmlNamestring
    processingStepsList of
    Form
    ProcessingStep
    processingTypeStepTypeEnumRequirement
    sizeSize
    stylestring
    submitFailedLandingPageIdintegerIdRequirement
    accessedAtintegerDateRequirement
    createdAtintegerReadOnlyDateRequirement
    createdByintegerReadOnlyIdRequirement
    currentStatusstring
    depthRequestDepthEnumRequirement
    descriptionstring
    folderIdintegerIdRequirement
    idintegerThe unique Id of the FormIdRequirement
    namestring
    permissionsInstance
    Permissions
    EnumRequirement
    scheduledForintegerDateRequirement
    sourceTemplateIdstring
    updatedAtintegerReadOnlyDateRequirement
    updatedByintegerReadOnlyIdRequirement

     

    Related Operations

    • GET (list) : /assets/forms?depth={depth}&count={count}&page={page}&search={search}&orderBy={orderBy}&lastUpdatedAt={lastUpdatedAt}