Task Action — Send HTTP Request

Overview

Integriti’s Task Action for Send HTTP Request allows key functionality from third-party systems to be controlled directly from the Integriti software suite, providing a single head-end for management. This task action can:

  • Control Third-Party Systems: Any system that can receive HTTP requests can be controlled and maintained
  • Control Integriti via REST API: Integriti’s built-in REST API allows a Task Action to control and maintain Integriti through HTTP requests (see also the Integriti Communication Handlers REST XML Web API documentation)

Prerequisites

  • Integriti System Designer access with permissions to create Scheduled Tasks
  • Network connectivity between the Integriti Client/Server and the target device
  • Target server/device details (IP address or domain name, port, authentication credentials if required)
  • For HTTPS: a valid certificate or knowledge of certificate validation requirements
  • Firewall rules allowing outbound HTTP/HTTPS from the Integriti machine to the target

Step-by-Step

1. Create a New Scheduled Task

  1. Open Integriti System Designer
  2. Navigate to Home > Scheduled Tasks
  3. Click Add to create a new scheduled task
  4. Select the Actions tab
  5. Press the Add button to add a new action
  6. From the action type dropdown, select Send HTTP Request

2. Setting Up Authentication

Configure based on the target server’s requirements:

  1. Authentication Type: Select the method required by the target server:
    • None: Leave Login Name and Password blank (no authentication required)
    • Basic: Username and password sent in plain text (use only with HTTPS)
    • Digest: More secure challenge-response authentication
  2. Login Name: Enter the username for the target server
  3. Login Password: Enter the password for the target server

Integriti REST API V2 tip: Use Basic authentication with an Operator’s login credentials.

3. Setting Up Connection

  1. Use HTTPS:

    • Ticked (true): For secure connections using port 443 (default)
    • Unticked (false): For unencrypted HTTP using port 80
    • Tip: Enter the address in a web browser to check whether the target uses HTTPS
  2. Certificate Validation Mode (appears only when Use HTTPS is ticked):

    • Default: Requires the server’s certificate to be installed on the PC
    • Accept All: Accepts any certificate from the server (less secure)
    • Specify Thumbprint: Requires a matching SHA-256 thumbprint for invalid certificates
  3. Certificate Thumbprint: Enter the SHA-256 thumbprint if using “Specify Thumbprint” mode. Find this in Firefox by clicking the lock icon > Connection not secure > More Information > View Certificate

  4. Address: Enter the target IP address (e.g., 192.168.0.2) or domain name (e.g., example.com)

  5. Port: Enter the port number (default: 80 for HTTP, 443 for HTTPS). Ensure this port is allowed through the Integriti Client machine’s firewall.

  6. Address Prefix: Optional directory path before the endpoint. Example:

    • Prefix = restapi
    • Result: http://192.168.0.2:80/restapi/SendAction?param=requestMethod
  7. Path: The endpoint and query parameters. Example:

    • Path = ApiVersion
    • Full URL = http://192.168.0.2:80/restapi/ApiVersion

4. Setting Up Content

  1. Request Type: Select the HTTP method:

    • GET: Retrieve data without sending content
    • POST: Send content and receive a response
    • PUT: Replace content at the target address
    • DELETE: Remove content at the target address
  2. Media Type: Specify the file type of the request (e.g., Text, Application/Json)

  3. Data Format: Choose the format for the request body:

    • Plain: Simple text content
    • XML: Structured XML (e.g., <User><FirstName>John</FirstName></User>)
    • JSON: Structured JSON (e.g., {"User":{"FirstName":"John","LastName":"Doe"}})
    • Form URL Encoded: Key-value pairs (e.g., FirstName=John&LastName=Doe)
  4. Body: Enter the content to send (for POST and PUT methods). JSON requires double curly braces: {{"move":true,"position":{{"x":1,"y":1,"z":7}}}}

  5. Configurable Header Keys and Values: Add custom HTTP headers if required. Separate multiple keys and values with :. Example:

    • Keys: API-KEY:Content-Type
    • Values: abc123:application/json
  6. Request Timeout (s): Set the maximum time in seconds to wait for a response before failing the task

5. Configure Error Handling

  1. Ignore Errors:
    • Selected: If this task fails, remaining tasks in the schedule will still execute
    • Not selected: If this task fails, no further tasks in the schedule will run

6. Testing

  1. After configuring all settings, manually trigger the Scheduled Task or wait for its scheduled time
  2. Monitor the Log Viewer for results:
    • Success: Response data appears as a Message type entry
    • Failure: Error details appear as a Warning type entry with the full URL that was attempted
  3. Common failure messages:
    • “Unable to connect to the remote server” — check that the Address, Port, and network connectivity are correct
    • Authentication failures — verify Login Name, Password, and Authentication Type

Verification

  • Trigger the Scheduled Task manually and check the Log Viewer for success
  • Verify the expected action occurred on the target system (e.g., user created, door unlocked)
  • For GET requests, confirm the returned data matches expectations
  • Test with edge cases (invalid credentials, unreachable server) to verify error handling

Troubleshooting

IssueSolution
”Unable to connect to the remote server”Verify the Address and Port are correct; check network/firewall connectivity from the Integriti machine to the target
Authentication failureConfirm Authentication Type (Basic vs Digest), Login Name, and Password match the target server requirements
HTTPS certificate errorSwitch Certificate Validation Mode to “Accept All” for testing, then configure the correct certificate
Request times outIncrease Request Timeout value; check target server is responsive
Body content not parsed correctlyCheck Data Format matches the actual content format; for JSON, ensure double curly braces for literal braces
Task Action not appearingEnsure you are editing a Scheduled Task, not a standard Task; Task Actions are configured under the Actions tab