Forum Discussion

prasadu507's avatar
3 years ago

JAVA SDK for calling Khoros Rest APIS

Hi Team,

 

We need to read/update Khoros Messages programmatically.

Using Khoros Rest APIS we can do that. But we are looking for JAVA SDK , to call Khoros rest APIS.

Does Khoros provides any Java SDK to call Khoros Rest APIS.

Could you please guide me on this.

 

Thanks &  Regards,

Prasad

 

  • Hi prasadu507we only have REST APIs. However, not a Java SDK that encapsulates that, calling a REST API with Java is easy.

    I will be sending you a link through a Private Message to a video showing how to use Java to call REST APIs.

     


  • Hello prasadu507,
    I have a custom field (metadata) c_message_last_reviewed_date in messages table and when I tried to update using the method mentioned here: https://developer.khoros.com/khoroscommunitydevdocs/reference/update-message

    It's working for me.
    Here is the example:

    call method: PUT
    URL: https://[COMMUNITY-DOMAIN]/api/2.0/messages/<message-id>
    Header params: 

    - content-type: application/json
    - li-api-session-key: [SESSION-KEY]

    Body raw json:
    {
    "data":{
    "type":"message",
    "c_message_last_reviewed_date": "2022-08-16T16:13Z"
    }
    }

     Response is returning as 200 and value has been updated.

    Let me know further details like which field you are trying to update or if you want we can sync on a call to resolve it.

    Regards,
    Abhishek Gupta

  • AbhishekGu Thank you for helping, highly appreciated!

    prasadu507  If the above response answered your questions, please feel free to mark it as an accepted solution!

     

4 Replies

  • Hi prasadu507we only have REST APIs. However, not a Java SDK that encapsulates that, calling a REST API with Java is easy.

    I will be sending you a link through a Private Message to a video showing how to use Java to call REST APIs.

     


  • Hello prasadu507,
    I have a custom field (metadata) c_message_last_reviewed_date in messages table and when I tried to update using the method mentioned here: https://developer.khoros.com/khoroscommunitydevdocs/reference/update-message

    It's working for me.
    Here is the example:

    call method: PUT
    URL: https://[COMMUNITY-DOMAIN]/api/2.0/messages/<message-id>
    Header params: 

    - content-type: application/json
    - li-api-session-key: [SESSION-KEY]

    Body raw json:
    {
    "data":{
    "type":"message",
    "c_message_last_reviewed_date": "2022-08-16T16:13Z"
    }
    }

     Response is returning as 200 and value has been updated.

    Let me know further details like which field you are trying to update or if you want we can sync on a call to resolve it.

    Regards,
    Abhishek Gupta

  • AbhishekGu Thank you for helping, highly appreciated!

    prasadu507  If the above response answered your questions, please feel free to mark it as an accepted solution!