Project

General

Profile

Multiple roster entry using tigase rest api using roster fixer.

raj vasani
Added over 3 years ago

I am trying to create roster entry using tigase rest api. But i dont know how to do .

My tigase URL : http://example.com:8088/rest/adhoc/sess-man@example.com

Request type : POST

Request data :

<command>
        <node>roster-fixer</node>
        <fields>
            <item>
                <var>roster-owner-jid</var>
                <value>abc@example.com</value>
            </item>
            <item>
                <var>roster-action</var>
                <value>update</value>
            </item>
            <item>
                <var>roster-buddy-list</var>
                <label>text-multi</label>
                <value>xyz@example.com,xyz,both</value>
                <value>pqr@example.com,pqr,both</value>
                <value>bcd@example.com,bcd,both</value>
                <value>mno@example.com,mno,both</value>
            </item>
        </fields>
</command>

using this command only last (mno@example.com,mno,both) roster entry created in database. Above all values roster entry is not seen in database.

Response is :

<command>
    <jid>sess-man@example.com</jid>
    <node>roster-fixer</node>
    <fields>
        <item>
            <var>Note</var>
            <label>fixed</label>
            <value>Operation successful</value>
        </item>
        <item>
            <var>Report: </var>
            <label>text-multi</label>
            <value>
                <item>User: abc@example.com is offline, updating database only</item>
                <item>Buddy: mno@example.com added to the roster</item>
            </value>
        </item>
    </fields>
</command>

Any solution ???


Replies (1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

As indicated in RosterFixer - this script is only intended to fix user roster. For management of user roster you should use one of the following:

Please bear in mind, that neither of those scripts is intended for batch modifications.

    (1-1/1)