HAP icon

HAP

Interact with HAP (Hyper Application Platform) API

Overview

This node interacts with the HAP (Hyper Application Platform) API to manage roles and their memberships. Specifically, the "Remove Member" operation under the "Role" resource allows users to remove members from a specified role. Members can be individual users, departments, department trees, jobs, or organization roles.

Common scenarios for this node include:

  • Managing access control by removing users or groups from specific roles.
  • Automating organizational changes where certain departments or job roles lose permissions.
  • Cleaning up role memberships in bulk by specifying multiple member types.

For example, an HR automation workflow might use this node to remove employees who have left a department from all roles associated with that department.

Properties

Name Meaning
Role ID The unique identifier of the role from which members will be removed.
User IDs An array of user IDs representing individual users to remove from the role.
Department IDs An array of department IDs representing departments to remove from the role.
Department Tree IDs An array of department tree IDs representing hierarchical department groups to remove.
Job IDs An array of job IDs representing job positions to remove from the role.
Organization Role IDs An array of organization role IDs representing other roles within the organization to remove.

Output

The node outputs JSON data reflecting the result of the removal operation. This typically includes confirmation of successful removals or details about any failures. The exact structure depends on the API response but generally contains status information and possibly updated role membership details.

No binary data output is expected from this operation.

Dependencies

  • Requires an API key credential to authenticate with the HAP API.
  • The node expects network connectivity to the HAP service endpoint.
  • Proper configuration of the API authentication credentials in n8n is necessary.

Troubleshooting

  • Invalid Role ID: If the provided Role ID does not exist or is malformed, the API may return an error indicating the role was not found. Verify the Role ID is correct.
  • Empty Member Arrays: Providing empty arrays for all member types may result in no action or an error. Ensure at least one member ID is specified.
  • Permission Issues: Insufficient permissions for the API key may cause authorization errors. Confirm the API key has rights to modify role memberships.
  • Malformed JSON Input: The userIds, departmentIds, etc., must be valid JSON arrays. Invalid JSON syntax will cause parsing errors.
  • Network Errors: Connectivity issues to the HAP API endpoint will prevent execution. Check network settings and API availability.

Links and References

Discussion