/Xmpp/GetRoster

Gets the account’s roster.

JSON

Request
{
	"offset":Optional(Int(0 <= POffset <= 2147483647)),
	"maxCount":Optional(Int(0 < PMaxCount <= 2147483647))
}
Response (if successful)
{
	"RosterItems":
	{
		"bareJid": Required(Str(PBareJid)),
		"pendingSubscription": Required(Bool(PPendingSubscription)),
		"status": Required(Str(PStatus)),
		"name": Required(Str(PName)),
		"Groups": Required(Str(PGroups)?[])
	}?[]
}

XML

Request
<GetRoster xmlns="https://waher.se/Schema/BrokerAgent.xsd"
           offset=(Optional(Int(0 <= POffset <= 2147483647)))
           maxCount=(Optional(Int(0 < PMaxCount <= 2147483647))) />
Response (if successful)
<Roster xmlns="https://waher.se/Schema/BrokerAgent.xsd">
	<RosterItems>
		<[
		<Item bareJid=(Required(Str(PBareJid)))
					pendingSubscription=(Required(Bool(PPendingSubscription)))
					status=(Required(Str(PStatus)))
					name=(Required(Str(PName)))>
			<Groups>
				<[<Item><[Optional(Str(PGroups))]></Item>?[]]>
			</Groups>
		</Item>?[]
		]>
	</RosterItems>
</Roster>

Input Parameters

Parameter Description
POffset Offset into the roster where response begins.
PMaxCount Maximum number of roster items to return.

Response Parameters

Parameter Description
PBareJid Bare JID of roster item.
PPendingSubscription If the account has a pending subscription request to the remote entity.
PStatus Status of roster item.
PName Name given to the roster item.
PGroups Names of groups to which the roster item is assigned.

Javascript Library

Use the following asynchronous method in the Javascript Library, to call this resource.

var Response = await AgentAPI.Xmpp.GetRoster(Offset,MaxCount);
Test



Request Payload:

   

Response Payload: