Directus icon

Directus

Consume Directus API

Overview

This node interacts with the Directus API to perform various operations on different resources. Specifically, for the Utilities resource and the Verify Hash operation, it verifies whether a given string matches a provided hash. This is useful in scenarios where you need to confirm data integrity or authenticate data by comparing its hash value.

Practical examples include:

  • Verifying passwords or tokens against stored hashes.
  • Checking file integrity by comparing computed hashes.
  • Validating data authenticity in workflows that require security checks.

Properties

Name Meaning
String The source string whose hash you want to verify.
Hash The hash value you want to verify the string against.

Output

The output JSON contains the result of the hash verification. It typically includes a boolean indicating whether the string matches the hash or not. The exact structure depends on the Directus API response but generally looks like:

{
  "result": true
}

or

{
  "result": false
}

indicating success or failure of the verification.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Directus API via an API key credential.
  • The node uses the Directus API endpoint utils/hash/verify with a POST request.
  • Proper configuration of the Directus API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing an invalid or malformed hash or string may lead to errors or false negatives.
    • Network connectivity problems can prevent API calls from succeeding.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API keys; reconfigure credentials.
    • Validation errors from the API may indicate incorrect input formats; ensure the string and hash are correctly provided.
    • Timeout or network errors suggest connectivity issues; check your network and Directus server availability.

Links and References


This summary focuses solely on the Utilities > Verify Hash operation as requested, based on static analysis of the provided source code and property definitions.

Discussion