Hi everyone,
assuming that I'm not doing anything wrong then this endpoints returns the collection of all attachments with their content.
"https://$($WebconConfig.Hostname)/api/data/v7.0/db/$($WebconConfig.DatabaseId)/elements/$ElementId/attachments"
$result = Invoke-WebconApiRequest -Method "GET" -Uri $uri
$result.attachments[0].content.length
932976
Depending on the use case, it may not be necessary to return the actual content of the attachment. I'm also wondering how this will react if there are dozens of large fiels.
Therefore I would suggest to add a flag /query parameter to especially request the content / skip the content.
Best regards,
Daniel