browneandrae
5 years agoExpert
Move a message programmatically to a different board
thanks, trying the below to move the message. I looked at v1 and v2 calls and neither are working. The error message I get for the call below is the second snippet. I couldn't find any specific documentation for how to move a message. Any advice please?
1st snippet
<#assign pathConstruct = "/messages/${messageId}" />
<#assign messagePostCall = restBuilder().method("PUT").path(pathConstruct).body({"board": {"id" :"UserReportedSpam","type": "board"}} ).admin(true) />
<#assign userCanRemovePost = true />
<#assign resp = messagePostCall.call() />
2nd snippet
InMemoryObjectInstanceTemplateModel{entity=InMemoryObjectInstance [fieldMap={http_code=null, data=InMemoryObjectInstance [fieldMap={code=303, developer_message=messages is not a valid collection name (for the objectKey: ObjectKey[board(version: 1)]), more_info=, type=error_data}, object=ObjectKey[error_response_data(version: 1)]], message=board is not a valid object for the messages collection., status=error}, object=ObjectKey[error_response(version: 1)]]}
<#assign pathConstruct = "/messages/id/${messageId}/move/board/id/BoardId" />
<#assign apiResults = restadmin(pathConstruct) />