HookMesh & CDR Integration Document Legacy Version(s)

This page group has the documentations about old versions of HookMesh, if you will/are using the versions v2.1.4 do not follow the documentation here.

Documentation


The system provides a way to run files through a specific flow (e.g., for CDR sanitization) and then retrieve the analysis results once processing is complete. The workflow is as follows:

  1. POST File to Flow: Submit a file to a specified flow for processing.

  2. Check Submission Status: Poll the system until the file processing is complete, through /listen/{uuid} request.

  3. Download Sanitized File: Once the processing is done, download the sanitized file if available(CDR has been successfully ran).

Authentication

All requests to the public API endpoints require an Authorization header containing a Bearer token:

Authorization: Bearer <hookmesh api token>

Replace <hookmesh api token> with your valid token.

Endpoints

Run Flow

Endpoint:

POST /public-api/runFlow/{flowId}

Description: This endpoint takes in a file, processes it through the specified flow, and returns a UUID representing the submission. Use this UUID to check the status and retrieve results.

Path Parameters:

  • flowId (string, required): The ID or Alias of the flow.

Headers:

  • Authorization: Bearer <hookmesh api token>

Request (multipart/form-data):

  • file: The file to be analyzed/sanitized. Provide the file from your local system.

cURL Example:

Success Response Example:

Notes:

  • After you get the success message, you will need to periodically query the /listen/{uuid} endpoint to check the submission status.


Listen for Submission Results

Endpoint:

Description: Check the status of a previously submitted file. Once processing is complete, details about the sanitized file and other metadata are returned.

Path Parameters:

  • uuid (string, required): The UUID returned from the runFlow request.

Headers:

  • Authorization: Bearer <hookmesh api token>

cURL Example:

Example Successful Response

Response Details

  • submission.status.statusID indicates the current status of processing:

    • 1 or 2: Processing or pending.

    • 3: Completed (File has been analyzed and sanitized).

  • submission.hashes includes hash values (MD5, SHA1, SHA256) for the submitted file.

  • submission.level indicates the risk or maliciousness level of the file if available.

    • Not Measured

    • Informative

    • Suspicious

    • Malicious

Download Sanitized File

Endpoint:

PS: Since this link will be provided in both Webhook & Listen Request you don't need to build this URL in your own, just use the URL provided to you in result[0].links[0].link .

Query Parameters:

  • id (string, required): The module ID retrieved from the listen response.

  • uuid (string, required): The UUID retrieved from the original submission.

Headers:

  • Authorization: Bearer <hookmesh api token>

cURL Example:

Troubleshooting

  • 401 Unauthorized: Ensure your Authorization header and token are correct.

  • 404 Not Found: Check if you used the correct uuid or moduleId.

  • Timeouts: The sanitization process can take time. If no webhook is used, continue polling until completion.

  • If you checked this document and still the issue persists, send email to [email protected]

Last updated