Files

54 lines
1.3 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "immich_activities Data Source - immich"
subcategory: ""
description: |-
Retrieves a list of activities for an album or asset.
---
# immich_activities (Data Source)
Retrieves a list of activities for an album or asset.
## Example Usage
```terraform
data "immich_activities" "album_activities" {
album_id = "your-album-uuid"
}
output "all_comments" {
value = [for a in data.immich_activities.album_activities.activities : a.comment if a.type == "COMMENT"]
}
output "like_count" {
value = length([for a in data.immich_activities.album_activities.activities : a if a.type == "LIKE"])
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `album_id` (String) ID of the album.
### Optional
- `asset_id` (String) ID of the asset.
### Read-Only
- `activities` (Attributes List) List of activities. (see [below for nested schema](#nestedatt--activities))
<a id="nestedatt--activities"></a>
### Nested Schema for `activities`
Read-Only:
- `comment` (String) Comment text.
- `created_at` (String) Timestamp when the activity was created.
- `id` (String) Unique identifier for the activity.
- `type` (String) Type of activity (COMMENT or LIKE).
- `user_id` (String) ID of the user who performed the activity.