Endpoint: /sites/{siteId}/uploadForms/{uploadFormName}

Returns site upload settings. Update site upload forms settings. Deletes upload form.

  • GET
  • PATCH
  • DELETE

Method & URL

GET https://[server URL]:[port]/admin/v2/sites/{siteId}/uploadForms/{uploadFormName}

GET Body Sample

Copy
### GET Specific Upload Forms Settings####
### Enter the form ID

@upLoadFormsID = {{formsList.response.body.$.data[0].id}}

GET https://{{host}}/admin/v2/sites/{{Siteid}}/uploadForms/{{upLoadFormsID}} HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

GET Response Body Sample

Copy
{"data":{"id":"uploadFormName","type":"uploadForm","attributes":{"description":"Testing Forms from POST REST API",
"displayName":"FORM_1","displayInstruction":"Enter Text","enabled":true,"showForEachFileUploaded":true,
"userGroupId":"a0db9377-92a3-4a38-8c0f-09f268d78ff1","uploadFormElements":[{"name":"","displayLabel":"FORM_1",
"type":"String","values":"domain.com","required":true}]}},"links":{
"self":"/admin/v2/sites/6203305a-d7c6-499e-a59b-81500765f8f2/uploadForm/uploadFormName",
"userGroups":"/admin/v2/sites/6203305a-d7c6-499e-a59b-81500765f8f2/userGroups"}}

GET PowerShell Sample

Copy
###GET Upload Forms Settings###
Write-Output "GET Upload Forms Settings"
Write-Output "-----------------"
#$siteID = "Enter site ID"
$UpFormslist = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/uploadForms" -Method 'GET' -Headers $authHeader
Write-Output $UpFormslist | ConvertTo-Json -Depth 25 

Method & URL

PATCH https://[server URL]:[port]/admin/v2/sites/{siteId}/uploadForms/{uploadFormName}

PATCH Body Sample

Copy
###
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/uploadForms/{{upLoadFormsID}} HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}

{
  "data": {
    "id": "uploadFormName",
    "type": "uploadForm",
    "attributes": {
      "description": "Testing Forms from POST REST API",
      "displayName": "FORM_1",
      "displayInstruction": "Enter Text",
      "enabled": true,
      "showForEachFileUploaded": false,
      "userGroupId": "a0db9377-92a3-4a38-8c0f-09f268d78ff1",
      "uploadFormElements": [
        {
          "name": "",
          "displayLabel": "FORM_1",
          "type": "String",
          "values": "domain.com",
          "required": true
        }
      ]
    }
  }
}

POST Response Body Sample

Copy
{"data":{"id":"uploadFormName","type":"uploadForm","attributes":{"description":
"Testing Forms from POST REST API","displayName":"FORM_1","displayInstruction":"Enter Text",
"enabled":true,"showForEachFileUploaded":false,"userGroupId":"a0db9377-92a3-4a38-8c0f-09f268d78ff1",
"uploadFormElements":[{"name":"","displayLabel":"FORM_1","type":"String","values":"domain.com",
"required":true}]}},"links":{"self":
"/admin/v2/sites/6203305a-d7c6-499e-a59b-81500765f8f2/uploadForms/uploadFormName",
"userGroups":"/admin/v2/sites/6203305a-d7c6-499e-a59b-81500765f8f2/userGroups"}}

PATCH PowerShell Sample

Copy
$update = 
'{
  "data": {
    "id": "uploadFormName",
    "type": "uploadForm",
    "attributes": {
      "description": "Testing Forms from POST REST API",
      "displayName": "FORM_1",
      "displayInstruction": "Enter New Text",
      "enabled": true,
      "showForEachFileUploaded": false,
      "userGroupId": "a0db9377-92a3-4a38-8c0f-09f268d78ff1",
      "uploadFormElements": [
        {
          "name": "",
          "displayLabel": "FORM_1",
          "type": "String",
          "values": "domain.com",
          "required": true
        }
      ]
    }
  }
}
'

$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 10
$patchUploadFormsReturn = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/uploadForms/$formsID" -Method 'PATCH' -Headers $authHeader -Body $update
Write-Output $patchUploadFormsReturn | ConvertTo-Json 

DELETE Body Sample

Copy
### GET Specific Upload Forms Settings####
### Enter the form ID

@upLoadFormsID = {{formsList.response.body.$.data[0].id}}

DELETE https://{{host}}/admin/v2/sites/{{Siteid}}/uploadForms/{{upLoadFormsID}} HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

DELETE Response Body Sample

Copy
HTTP/1.1 204 No Content
Date: Mon, 08 Aug 2022 20:43:09 GMT
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate
Expires: -1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self' 'unsafe-inline' 
'unsafe-eval' data:;
Referrer-Policy: no-referrer

DELETE PowerShell Sample

Copy
$formsID = $uploadFList.data[0].id 

$deleteUploadFList = Invoke-RestMethod -Uri 
"$baseURL/v2/sites/$siteID/uploadForms/$formsID" 
-Method 'DELETE' -Headers $authHeader
Write-Output $deleteUploadFList | ConvertTo-Json