Project

General

Profile

adhoc commands

Dathan Pattishall
Added about 4 years ago

Going through the documentation located here https://projects.tigase.org/projects/tigase-http-api/wiki/Usage_examples

I issued a command

http://localhost:8080/rest/adhoc/sess-man@dathan.local

what was returned was the following

<items>
<item>
<jid>sess-man@dathan.local</jid>
<node>del-script</node>
<name>Remove command script</name>
</item>
<item>
<jid>sess-man@dathan.local</jid>
<node>add-script</node>
<name>New command script</name>
</item>
</items>

Notice that

 <item>
    <jid>sess-man@domain.com</jid>
    <node>http://jabber.org/protocol/admin#get-active-users</node>
    <name>Get list of active users</name>
  </item>

Is missing.

How do I enable http://jabber.org/protocol/admin#get-active-users as well as other commands?

My end goal is to get a

a rest call to list of active users online,

a rest call to see if a single user is online,

send a message on behalf of a user over rest


Replies (2)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

This is most likely a sign of misconfigured system. All the ad-hoc commands are implemented as Groovy scripts which are loaded at startup time or at run-time. Apparently on your installation groovy scripts are missing.

Added by Dathan Pattishall about 4 years ago

Ah thanks

to help other people having the same issue below is in the scripts/rest directory

./adhoc/AdHoc.groovy

./avatar/AvatarGet.groovy

./avatar/AvatarPutNoAuth.groovy

./footer.html

./header.html

./pubsub/PubsubAdHoc.groovy

./pubsub/PubSubAdHocActions.groovy

./stats/ComponentStats.groovy

./stats/ComponentStatsGet.html

./stats/ServerStats.groovy

./stats/ServerStatsGet.html

./user/UserAdmin.groovy

./user/UserAdminGet.html

./user/UserUser.groovy

./user/UserUserGet.html

./users/UsersDomainList.groovy

./users/UsersDomainListGet.html

./users/UsersList.groovy

./users/UsersListGet.html

BUT

scripts/admin is where all the adhoc commands are

./AddUser.groovy

./AddUserTracker.groovy

./BroadcastToOnline.groovy

./ChangeUserPassword.groovy

./CompManager.groovy

./CompRepoItemAdd.groovy

./CompRepoItemRemove.groovy

./CompRepoItemUpdate.groovy

./CompRepoReload.groovy

./ConfigList.groovy

./ConnectionTime.groovy

./CreateNode.groovy

./default-config.groovy

./DeleteNode.groovy

./DeleteUser.groovy

./DNSQuery.groovy

./example_HelloWorld.groovy

./example_TigaseScriptingGuide.groovy

./ForceStopServiceForKey.groovy

./GetAnyFile.groovy

./GetConfigFile.groovy

./GetInitPropertiesFromMemory.groovy

./GetListOfActiveUsers.groovy

./GetListOfIdleUsers.groovy

./GetListOfOnlineUsers.groovy

./GetNumberOfActiveUsers.groovy

./GetNumberOfIdleUsers.groovy

./GetRegisteredUserList.groovy

./GetTopActiveUsers.groovy

./GetUserRoster.groovy

./ListServiceKeys.groovy

./LoadErrors.groovy

./PluginManager.groovy

./PublishItem.groovy

./ReloadHandlerScripts.groovy

./RemoveUserTracker.groovy

./room-remove.groovy

./RosterFixer.groovy

./RosterFixerCluster.groovy

./S2SBadConnectionStates.groovy

./S2SCIDState.groovy

./S2SResetBadConnections.groovy

./SimServiceStopped.groovy

./SSLCertificateAdd.groovy

./SubscribeNode.groovy

./UnsubscribeNode.groovy

./UserDomainFilter.groovy

./UserRosterManagement.groovy

./UserRosterManagementExt.groovy

./UserStatistics.groovy

    (1-2/2)