Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 2.97 KB

File metadata and controls

37 lines (27 loc) · 2.97 KB

Clear Room History

Cleans up a room, removing messages from the provided time range.

HTTP MethodURLRequires Auth
POST/api/v1/rooms.cleanHistoryyes

Body Parameter

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe room ID.
latest*2016-09-30T13:42:25.304ZThe end of time range of messages.
oldest*2016-05-30T13:42:25.304ZThe start of the time range of messages.
inclusivetrueWhether messages which land on the latest and oldest dates should be included. By default, the value is false.
excludePinnedtrueWhether pinned messages should be deleted. By default, the value is false.
filesOnlytrueWhether to only delete files and keep messages intact. By default, the value is false.
users["vynmera", "ggazzo"]Specific set of users whose content to delete. By default, the value is [], that is, everyone.
limit10The amount of messages to prune. By default, the value is 0 (all).
ignoreDiscussiontrueDetermines if messages from discussions should be pruned. By default, the value is true.
ignoreThreadstrueDetermines if messages from threads should be pruned. By default, the value is true.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     http://localhost:3000/api/v1/rooms.cleanHistory \
     -d '{ 
          "roomId": "roomId", 
          "latest": "2016-12-09T13:42:25.304Z", 
          "oldest": "2016-08-30T13:42:25.304Z" }'

Example Response

{
   "success": true
}

Change Log

Version Description
0.64.0 Added
0.67.0 Added fields limit, excludePinned, filesOnly and users