Forum Discussion
Where you are requesting this free-marker API to post message?
Is this you are using in Endpoint or component? then it will always give you blank response, and to print the output from the response you need add code like below to display response example like below for success from API return.
<#assign result_post = restadmin("/boards/id/${board_id}/messages/post?message.subject=${msg_subject?url}&message.body=${msg_body?url}")/>
${result_post.@status}
so for above your response will be "success".
And if you same you run with jQuery or other method like curl it will give you full result in the response of console.
That's the thing. It never gave me a blank result before.
I have been using this same code for many years and always got results back in the endpoint. I'd get the xml result and the endpoint parsed that to know what to do next.
My endpoint has this code and I always got results:
<#assign result_post = restadmin("/boards/id/${board_id}/messages/post?message.subject=${msg_subject?url}&message.body=${msg_body?url}")/>
<#assign status_post = result_post.@status/>
<#if status_post == "success">
<#assign result_post_url = result_post.message.@view_href/>
<#assign result_msg_id = result_post.message.id/>
I could parse the result, get the status, get the url of the newly created post, the id. Now, just blank.
Something changed, and I wish I knew what it was.
But for argument's sake, let's say I want to do this now.
My endpoint creates a new post in the community. How do I know what its metadata, id, url, are?
Related Content
- 6 years ago
- 2 years ago
- 4 years ago
- 2 years ago