Reputation: 31
I want export channel messages to ftp server or external drive. I thing we can export messages via rest API. Could you any one help on this..
Upvotes: 3
Views: 7212
Reputation: 1719
The POST /channels/{channelId}/messages/_export
endpoint is to export messages to files on the server filesystem. When the client does an export to the local file system, it basically writes the results of GET /channels/{channelId}/messages
with one file per message and attachments included. See Source.
Possibly the most effective way to get all your processed messages offsite is to just take a database backup.
The data pruner also has an option to archive messages to disk as they are pruned, and those files could be picked up and sent offsite if desired.
Upvotes: 0
Reputation: 3637
If you want to send messages to a REST API, you can use the HTTP Sender
destination connector type.
If your REST API Endpoint requires any special headers or authentication, you will need to configure this appropriately (such as by setting variables in the Destination Transformer). Don't forget to put something in the "Content" box at the bottom of the screen - this usually has a value such as ${message.transformedData}
or ${message.rawData}
.
If you want to send messages to an FTP server, you can use the File Writer
destination connector type. Again, make sure you put something such as ${message.transformedData}
in the "Template" field.
Upvotes: 4