Forum Discussion
You could get a new field added to the message then write to it when creating via API, you could then use that custom field to power a custom component to display a flag or something when the field is true etc.
Support will be able to help with the custom field.
- VikasB8 years agoBoss
Hi nrajesh Yes, lithium support can add an additional field to message API which can be used as a flag.
Or you can use another workaround to get it without adding any additional field. I would say when posting the message through API, you can add a label/tag which can be used to identify the messages posted through rest API.http://community.lithium.com/community-name/restapi/vc/blogs/id/[id] /messages/post
tag.add (optional) string the tags to be added to the message, with each tag separated by a comma. For example: tag.add=tag1,tag2 label.labels (optional) string The labels for the message, each label separated by a comma. For example: label.labels=label1,label2 - nrajesh8 years agoGuide
Hi VikasB,
I have created message with below given data, that also its throwing error,Method : POST
URL : https://api.stage.lithium.com/community/2.0/hhhkhk/messages
Headers: Content-Type - application/json
client-id - asdasdasdasd
Authorization - Bearer dfdsfsdfsdData :
{
"data": {
"type": "message",
"subject": "hello world",
"body": "this is a message post.",
"board": {
"id": "abcdiscussions"
},"labels":"test1, test2"
}
}Repsonse:
{"status":"error","message":"Unable to parse the required Content-Body from the request.","data":{"type":"error_data","code":308,"developer_message":"'labels' object does not contain a 'list_item_type' property, which is required for lists.","more_info":""},"metadata":{}}
Note: One more thing, which call can we use for REST API (https://api.stage.lithium.com/community/2.0/hhhkhk/messages OR http://community.lithium.com/community-name/restapi/vc)
Regards
Rajesh
- VikasB8 years agoBoss
nrajesh You can use this one even with the GET call also
https://lithiumstage.xyz.com/restapi/vc/blogs/id/[id]/messages/post?message.subject=Test&message.body=Test&label.labels=Test1,Test2'
In your post call, I guess you are not sending the parameter in the required format as an error mentioned in your post. The parameters should be like message.subject, messgae.body, label.labels etc.
Hope it would work for you.
Related Content
- 2 years ago
- 4 years ago
- 2 years ago