HAP icon

HAP

Interact with HAP (Hyper Application Platform) API

Role → Add Member

AI-generated

Overview

This node interacts with the Hyper Application Platform (HAP) API to manage roles and their memberships. Specifically, the "Add Member" operation under the "Role" resource allows users to add members—such as individual users, departments, department trees, jobs, or organization roles—to a specified role within the HAP system.

Common scenarios for this node include automating role assignments in an organization, managing access control by dynamically updating role memberships based on business logic, or integrating role management into broader workflows.

For example, you could use this node to automatically add new employees (user IDs) or entire departments to specific roles when they join a company, ensuring they receive appropriate permissions without manual intervention.

Properties

Name Meaning
Role ID The unique identifier of the role to which members will be added.
User IDs An array of user IDs representing individual users to add to the role.
Department IDs An array of department IDs whose members should be added to the role.
Department Tree IDs An array of department tree IDs representing hierarchical groups of departments to add.
Job IDs An array of job position IDs; members holding these jobs will be added to the role.
Organization Role IDs An array of organization role IDs; members assigned these roles will be added to the target role.

Output

The node outputs JSON data representing the result of the add member operation. This typically includes confirmation details such as success status, updated role membership information, or error messages if the operation failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the HAP API.
  • The node expects proper configuration of the HAP API credentials within n8n.
  • Network connectivity to the HAP API endpoint 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 might result in no changes or errors. Ensure at least one member ID array contains valid entries.
  • Permission Issues: Insufficient API permissions can cause authorization errors. Confirm that the API key has rights to modify role memberships.
  • Malformed JSON Input: The user, department, job, or organization role IDs must be valid JSON arrays. Invalid JSON syntax will cause parsing errors.
  • API Rate Limits: Frequent calls might hit rate limits imposed by the HAP API, resulting in temporary failures.

Links and References

Discussion