Forum Discussion

akshays's avatar
6 months ago

Any way to store an incoming JSON in the liql database?

We have a third-party API which will make certain POST calls to send JSON data over to Community. Do we have an option to store this JSON in the db? 

The workaround I was thinking of was to post all this data as messages in a certain board ( forum/tkb ), but the data coming in might not be structured well for user-firendly display. 


  • I'm not sure how you intend to use this, but here's one idea.

    Support will add custom fields to different collections for you. So, you could ask them to add a custom field to the "messages" collection and store your JSON there more cleanly than in a message body. 

    You could use this Create message (khoros.com) to post a message to the board you want with the JSON stored in a separate field on the message.

    Your body would look like this

    {
        "data": {
            "type": "message",
            "board": {
                "id": "myhiddenboard"
            },
            "subject": "JSON Post 6/5/2024",
            "body": "Todays JSON post!",
            "c_my_custom_json_field": "json_goes_here"
        }
    }