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
- Open Integriti System Designer
- Navigate to Home > Scheduled Tasks
- Click Add to create a new scheduled task
- Select the Actions tab
- Press the Add button to add a new action
- From the action type dropdown, select Send HTTP Request
2. Setting Up Authentication
Configure based on the target server’s requirements:
- 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
- Login Name: Enter the username for the target server
- 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
-
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
-
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
-
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
-
Address: Enter the target IP address (e.g.,
192.168.0.2) or domain name (e.g.,example.com) -
Port: Enter the port number (default:
80for HTTP,443for HTTPS). Ensure this port is allowed through the Integriti Client machine’s firewall. -
Address Prefix: Optional directory path before the endpoint. Example:
- Prefix =
restapi - Result:
http://192.168.0.2:80/restapi/SendAction?param=requestMethod
- Prefix =
-
Path: The endpoint and query parameters. Example:
- Path =
ApiVersion - Full URL =
http://192.168.0.2:80/restapi/ApiVersion
- Path =
4. Setting Up Content
-
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
-
Media Type: Specify the file type of the request (e.g.,
Text,Application/Json) -
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)
-
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}}}} -
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
- Keys:
-
Request Timeout (s): Set the maximum time in seconds to wait for a response before failing the task
5. Configure Error Handling
- 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
- After configuring all settings, manually trigger the Scheduled Task or wait for its scheduled time
- Monitor the Log Viewer for results:
- Success: Response data appears as a
Messagetype entry - Failure: Error details appear as a
Warningtype entry with the full URL that was attempted
- Success: Response data appears as a
- 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
| Issue | Solution |
|---|---|
| ”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 failure | Confirm Authentication Type (Basic vs Digest), Login Name, and Password match the target server requirements |
| HTTPS certificate error | Switch Certificate Validation Mode to “Accept All” for testing, then configure the correct certificate |
| Request times out | Increase Request Timeout value; check target server is responsive |
| Body content not parsed correctly | Check Data Format matches the actual content format; for JSON, ensure double curly braces for literal braces |
| Task Action not appearing | Ensure you are editing a Scheduled Task, not a standard Task; Task Actions are configured under the Actions tab |