Hudu icon

Hudu

Interact with Hudu REST API

Relation → Create

AI-generated

Overview

This node operation creates a relation between two entities in the Hudu system. It is useful for establishing connections or associations between different types of entities, such as assets, users, companies, or other resource types supported by Hudu. For example, you can create a relation linking an asset to a user or a company to a network, with an optional description explaining the nature of the relationship.

Use Case Examples

  1. Create a relation between an Asset and a User to indicate ownership.
  2. Link a Company entity to a Network entity to represent network ownership or management.

Properties

Name Meaning
To Entity ID The ID of the destination entity in the relation.
To Entity Type The type of the destination entity in the relation, such as Asset, User, Company, etc.
From Entity ID The ID of the origin entity in the relation.
From Entity Type The type of the origin entity in the relation, such as Asset, User, Company, etc.
Description Optional description to explain the relationship between the two entities.
Is Inverse Boolean flag indicating whether this relation is the inverse of another relation that will be automatically created.

Output

JSON

  • id - The unique identifier of the created relation.
  • toable_id - The ID of the destination entity in the created relation.
  • toable_type - The type of the destination entity in the created relation.
  • fromable_id - The ID of the origin entity in the created relation.
  • fromable_type - The type of the origin entity in the created relation.
  • description - The description provided for the relation.
  • is_inverse - Indicates if the relation is inverse of another relation.

Dependencies

  • Hudu REST API
  • API authentication token or API key credential

Troubleshooting

  • Ensure that the entity IDs provided (toable_id and fromable_id) exist in the Hudu system to avoid errors.
  • Verify that the entity types (toable_type and fromable_type) are valid and supported by the Hudu API.
  • If the 'Is Inverse' flag is set to true, be aware that an automatic inverse relation will be created; ensure this behavior is intended.
  • Common error messages may include invalid entity ID or type, missing required parameters, or authentication failures. Check API credentials and parameter values if errors occur.

Links

Discussion