Endpoint: /sites/{siteId}/contentIntegrity

Returns and updates the content integrity settings for specific site.

  • GET

  • POST

Method & URL

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

GET Body Sample

Copy
### GET a list of current content integrity profiles####
GET https://{{host}}/admin/v2/sites/{{Siteid}}/contentIntegrity HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}

GET Response Body Sample

Copy
{ "data": [ 
{ "id": "6f61c6c0-221e-4f01-94d0-46ba78ec0548", "type": "contentIntegrity", "attributes": 
{ "profileName": "TEST API" } }, 
{ "id": "03bebeda-1a89-40d2-a8c8-78ec078257db", "type": "contentIntegrity", "attributes": 
{ "profileName": "TEST API 2" } } ], "links": 
{ "self": "admin/v2/sites/0de7387f-1506-427d-b997-e18bcdb8cbae/contentIntegrity" 
} }

GET PowerShell Sample

Copy
###GET list of Content Integrity Profiles###
Write-Output "GET list of Content Integrity Profiles"
Write-Output "--------------------------------------"
#$siteID = "Enter site ID"
$CIlist = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/contentIntegrity" -Method 'GET' 
-Headers $authHeader
Write-Output $CIlist | ConvertTo-Json -Depth 25 

Method & URL

POST https://[server URL]:[port]/admin/v2/sites/{siteId}/contentIntegrity

POST Body Sample

Copy
### #POST content integrity profile ####
POST https://{{host}}/admin/v2/sites/{{Siteid}}/contentIntegrity/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
  "data": {
    "type": "contentIntegrity",
    "attributes": {
      "profileName": "Profile_API_TEST5",
      "host": "192.168.100.82",
      "port": 1344,
      "path": "/reqmode",
      "mode": "REQMOD",
      "scanLimit": {
        "enabled": true,
        "bytes": 100000
      },
      "headerOverrides": {
        "httpHost": {
          "enabled": true,
          "value": "192.168.100.83"
        },
        "xClientIp": {
          "enabled": true,
          "value": "192.168.100.52"
        },
        "xServerIp": {
          "enabled": true,
          "value": "192.168.100.60"
        },
        "xSubscriberIp": {
          "enabled": true,
          "value": "192.168.100.70"
        },
        "xAuthenticatedUser": {
          "enabled": true,
          "value": "192.186.100.12"
        },
        "xAuthenticatedGroups": {
          "enabled": true,
          "value": "Local://%USER.Log%"
        }
      },
      "responseHandling": {
        "continueOnConnectivityError": "Continue",
        "continueOnHttpError": "Continue",
        "continueOnIcapViolation": "Fail",
        "continueOnIcapRedaction": "Continue",
        "customHeadersToAudit": {
          "enabled": true,
          "headers": []
        }
      }
    }
  }
}

POST Response Body Sample

Copy
{ "data": 
{ "id": "53f00be5-9aa0-41ed-9fdf-ea99f6784238", "type": "contentIntegrity", "attributes": 
{ "profileName": "Profile_API_TEST", "host": true, "port": 1344, "path": true, 
"mode": "REQMOD", "scanLimit": { "enabled": true, "bytes": 100000 }, "headerOverrides": 
{ "httpHost": { "enabled": true, "value": "192.168.100.83" }, "xClientIp": 
{ "enabled": true, "value": "192.168.100.52" }, "xServerIp": 
{ "enabled": false, "value": "" }, "xSubscriberIp": 
{ "enabled": false, "value": "" }, "xAuthenticatedUser": 
{ "enabled": false, "value": "" }, "xAuthenticatedGroups": 
{ "enabled": false, "value": "" } }, "responseHandling": 
{ "continueOnConnectivityError": "Continue", "continueOnHttpError": 
"Continue", "continueOnIcapViolation": "Fail", "continueOnIcapRedaction": 
"Continue", "customHeadersToAudit": { "enabled": true, "headers": [] } } } }, "
links": { "self": 
"admin/v2/sites/0de7387f-1506-427d-b997-e18bcdb8cbae/contentIntegrity/53f00be5-9aa0-41ed-9fdf-ea99f6784238" } }

POST PowerShell Sample

Copy
###POST Create New Content Integrity Profile###
Write-Output " Create New Content Integrity Profile"
Write-Output "-------------------------------------"
$update = 
'{
  "data": {
    "type": "contentIntegrity",
    "attributes": {
      "profileName": "Profile_API_TEST6",
      "host": "192.168.100.82",
      "port": 1344,
      "path": "/reqmode",
      "mode": "REQMOD",
      "scanLimit": {
        "enabled": true,
        "bytes": 100000
      },
      "headerOverrides": {
        "httpHost": {
          "enabled": true,
          "value": "192.168.100.83"
        },
        "xClientIp": {
          "enabled": true,
          "value": "192.168.100.52"
        },
        "xServerIp": {
          "enabled": true,
          "value": "192.168.100.60"
        },
        "xSubscriberIp": {
          "enabled": true,
          "value": "192.168.100.70"
        },
        "xAuthenticatedUser": {
          "enabled": true,
          "value": "192.186.100.12"
        },
        "xAuthenticatedGroups": {
          "enabled": true,
          "value": "Local://%USER.Log%"
        }
      },
      "responseHandling": {
        "continueOnConnectivityError": "Continue",
        "continueOnHttpError": "Continue",
        "continueOnIcapViolation": "Fail",
        "continueOnIcapRedaction": "Continue",
        "customHeadersToAudit": {
          "enabled": true,
          "headers": []
        }
      }
    }
  }
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 25
$patchReturn = Invoke-RestMethod -Uri 
"$baseURL/v2/sites/$siteID/contentIntegrity" 
-Method 'POST' -Headers $authHeader -Body $update