Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Activity → Update

AI-generated

Overview

This node updates an existing activity by modifying its comment and optionally other fields. It is useful for scenarios where you need to edit or correct activity logs or comments in a system that tracks activities. For example, updating a user's comment on an activity or adding metadata to an activity record.

Use Case Examples

  1. Updating the comment of an activity with ID 1 to 'My updated comment'.
  2. Adding metadata to an activity while updating its comment.

Properties

Name Meaning
Comment The updated comment content for the activity. Supports Markdown formatting.
ID The unique identifier of the activity to update. Must be a number greater than or equal to 1.
Update Fields Additional optional fields to update on the activity, such as metadata to return in the response.

Output

JSON

  • id - The unique identifier of the updated activity.
  • comment - The updated comment content of the activity.
  • meta - Optional metadata returned as part of the update response.

Dependencies

  • Requires API authentication to the Directus system to perform update operations on activities.

Troubleshooting

  • Ensure the ID provided is valid and corresponds to an existing activity; otherwise, the update will fail.
  • The comment field is required and must not be empty; missing this will cause an error.
  • If metadata is specified, ensure it is in the correct format expected by the API to avoid response errors.

Discussion