Skip to content

Instantly share code, notes, and snippets.

@nikeee
Last active Feb 13, 2021
Embed
What would you like to do?
teamspeak-query-api
[
{
"Name": "login",
"Usages": [
"login client_login_name={username} client_login_password={password} ",
"login {username} {password}"
],
"Examples": [
{
"CommandLine": "login client_login_name=xyz client_login_password=xyz",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "login xyz xyz",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials."
},
{
"Name": "logout",
"Usages": [
"logout"
],
"Examples": [
{
"CommandLine": "logout",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deselects the active virtual server and logs out from the server instance."
},
{
"Name": "quit",
"Usages": [
"quit"
],
"Examples": [
{
"CommandLine": "quit",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Closes the ServerQuery connection to the TeamSpeak 3 Server instance."
},
{
"Name": "use",
"Usages": [
"use [sid={serverID}] [port={serverPort}] [-virtual]",
"use {serverID}"
],
"Examples": [
{
"CommandLine": "use sid=1",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "use port=9987",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "use 1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Selects the virtual server specified with sid or port to allow further interaction. The ServerQuery client will appear on the virtual server and acts like a real TeamSpeak 3 Client, except it's unable to send or receive voice data.\nIf your database contains multiple virtual servers using the same UDP port, use will select a random virtual server using the specified port."
},
{
"Name": "banadd",
"Usages": [
"banadd [ip={regexp}] [name={regexp}] [uid={clientUID}] [time={timeInSeconds}] [banreason={text}]"
],
"Examples": [
{
"CommandLine": "banadd ip=1.2.3.4 banreason=just\\s4\\sfun banid=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Adds a new ban rule on the selected virtual server. All parameters are optional but at least one of the following must be set: ip, name, or uid."
},
{
"Name": "banclient",
"Usages": [
"banclient clid={clientID} [time={timeInSeconds}] [banreason={text}]"
],
"Examples": [
{
"CommandLine": "banclient clid=4 time=3600 banid=2 banid=3",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Bans the client specified with ID clid from the server. Please note that this will create two separate ban rules for the targeted clients IP address and his unique identifier."
},
{
"Name": "bandelall",
"Usages": [
"bandelall"
],
"Examples": [
{
"CommandLine": "bandelall",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes all active ban rules from the server."
},
{
"Name": "bandel",
"Usages": [
"bandel banid={banID}"
],
"Examples": [
{
"CommandLine": "bandel banid=3",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes the ban rule with ID banid from the server."
},
{
"Name": "banlist",
"Usages": [
"banlist"
],
"Examples": [
{
"CommandLine": "banlist banid=7 ip=1.2.3.4 created=1259444002242 invokername=Sven invokercldbid=56 invokeruid=oHhi9WzXLNEFQOwAu4JYKGU+C+c= reason enforcements=0",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of active bans on the selected virtual server."
},
{
"Name": "bindinglist",
"Usages": [
"bindinglist"
],
"Examples": [
{
"CommandLine": "bindinglist ip=0.0.0.0",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of IP addresses used by the server instance on multi-homed machines."
},
{
"Name": "channeladdperm",
"Usages": [
"channeladdperm cid={channelID} ( permid={permID}|permsid={permName}permvalue={permValue} )..."
],
"Examples": [
{
"CommandLine": "channeladdperm cid=16 permsid=i_client_needed_join_power permvalue=50",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Adds a set of specified permissions to a channel. Multiple permissions can be added by providing the two parameters of each permission. A permission can be specified by permid or permsid."
},
{
"Name": "channelclientaddperm",
"Usages": [
"channelclientaddperm cid={channelID} cldbid={clientDBID} ( permid={permID}|permsid={permName} permvalue={permValue} )..."
],
"Examples": [
{
"CommandLine": "channelclientaddperm cid=12 cldbid=3 permsid=i_icon_id permvalue=100",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Adds a set of specified permissions to a client in a specific channel. Multiple permissions can be added by providing the two parameters of each permission. A permission can be specified by permid or permsid."
},
{
"Name": "channelclientdelperm",
"Usages": [
"channelclientdelperm cid={channelID} cldbid={clientDBID}permid={permID}|permsid={permName}..."
],
"Examples": [
{
"CommandLine": "channelclientdelperm cid=12 cldbid=3 permsid=i_icon_id|permsid=b_icon_manage",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from a client in a specific channel. Multiple permissions can be removed at once. A permission can be specified by permid or permsid."
},
{
"Name": "channelclientpermlist",
"Usages": [
"channelclientpermlist cid={channelID} cldbid={clientDBID} [-permsid]"
],
"Examples": [
{
"CommandLine": "channelclientpermlist cid=12 cldbid=3 cid=12 cldbid=3 permid=4353 permvalue=1 permnegated=0 permskip=0|permid=17276 permvalue=50 permnegated=0 permskip=0|permid=21415 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions defined for a client in a specific channel."
},
{
"Name": "channelcreate",
"Usages": [
"channelcreate channel_name={channelName} [channel_properties...]"
],
"Examples": [
{
"CommandLine": "channelcreate channel_name=My\\sChannel channel_topic=My\\sTopic cid=16",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a new channel using the given properties and displays its ID."
},
{
"Name": "channeldelete",
"Usages": [
"channeldelete cid={channelID} force={1|0}"
],
"Examples": [
{
"CommandLine": "channeldelete cid=16 force=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes an existing channel by ID. If force is set to 1, the channel will be deleted even if there are clients within."
},
{
"Name": "channeldelperm",
"Usages": [
"channeldelperm cid=123 permid={permID}|permsid={permName}..."
],
"Examples": [
{
"CommandLine": "channeldelperm cid=16 permsid=i_icon_id|permsid=i_client_needed_talk_power",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from a channel. Multiple permissions can be removed at once. A permission can be specified by permid or permsid."
},
{
"Name": "channeledit",
"Usages": [
"channeledit cid={channelID} [channel_properties...]"
],
"Examples": [
{
"CommandLine": "channeledit cid=15 channel_codec_quality=3 channel_description=My\\stext",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes a channels configuration using given properties."
},
{
"Name": "channelfind",
"Usages": [
"channelfind [pattern={channelName}]"
],
"Examples": [
{
"CommandLine": "channelfind pattern=default cid=15 channel_name=Default\\sChannel",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of channels matching a given name pattern."
},
{
"Name": "channelgroupadd",
"Usages": [
"channelgroupadd name={groupName} [type={groupDbType}]"
],
"Examples": [
{
"CommandLine": "channelgroupadd name=Channel\\sAdmin cgid=13",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a new channel group using a given name and displays its ID. The optional type parameter can be used to create ServerQuery groups and template groups."
},
{
"Name": "channelgroupaddperm",
"Usages": [
"channelgroupaddperm cgid={groupID} permid={permID} permvalue={permValue}",
"channelgroupaddperm cgid={groupID} permsid={permName} "
],
"Examples": [
{
"CommandLine": "channelgroupaddperm cgid=78 permsid=b_icon_manage permvalue=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "permvalue={permValue}\nAdds a set of specified permissions to a channel group. Multiple permissions can be added by providing the two parameters of each permission. A permission can be specified by permid or permsid."
},
{
"Name": "channelgroupclientlist",
"Usages": [
"channelgroupclientlist [cid={channelID}] [cldbid={clientDBID}] [cgid={groupID}]"
],
"Examples": [
{
"CommandLine": "channelgroupclientlist cid=2 cgid=9 cid=2 cldbid=9 cgid=9|cid=2 cldbid=24 cgid=9|cid=2 cldbid=47 cgid=9",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays all the client and/or channel IDs currently assigned to channel groups. All three parameters are optional so you're free to choose the most suitable combination for your requirements."
},
{
"Name": "channelgroupcopy",
"Usages": [
"channelgroupcopy scgid={sourceGroupID} tcgid={targetGroupID} name={groupName} type={groupDbType}"
],
"Examples": [
{
"CommandLine": "channelgroupcopy scgid=4 tcgid=0 name=My\\sGroup\\s(Copy) type=1 cgid=13",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a copy of the channel group specified with ssgid. If tsgid is set to 0,\nthe server will create a new group. To overwrite an existing group, simply set tsgid to the ID of a designated target group. If a target group is set, the name parameter will be ignored.\nThe type parameter can be used to create ServerQuery and template groups."
},
{
"Name": "channelgroupdel",
"Usages": [
"channelgroupdel cgid={groupID} force={1|0}"
],
"Examples": [
{
"CommandLine": "channelgroupdel cgid=13",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes a channel group by ID. If force is set to 1, the channel group will be deleted even if there are clients within."
},
{
"Name": "channelgroupdelperm",
"Usages": [
"channelgroupdelperm cgid={groupID} permid={permID}|...",
"channelgroupdelperm cgid={groupID} permsid={permName}|..."
],
"Examples": [
{
"CommandLine": "channelgroupdelperm cgid=16 permid=17276|permid=21415",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from the channel group. Multiple permissions can be removed at once. A permission can be specified by permid or permsid."
},
{
"Name": "channelgrouplist",
"Usages": [
"channelgrouplist"
],
"Examples": [
{
"CommandLine": "channelgrouplist cgid=1 name=Channel\\sAdmin type=2 iconid=100 savedb=1|cgid=2 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of channel groups available on the selected virtual server."
},
{
"Name": "channelgrouppermlist",
"Usages": [
"channelgrouppermlist cgid={groupID} [-permsid]"
],
"Examples": [
{
"CommandLine": "channelgrouppermlist cgid=13 permid=8470 permvalue=1 permnegated=0 permskip=0|permid=8475 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions assigned to the channel group specified with cgid."
},
{
"Name": "channelgrouprename",
"Usages": [
"channelgrouprename cgid={groupID} name={groupName}"
],
"Examples": [
{
"CommandLine": "channelgrouprename cgid=13 name=New\\sName",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes the name of a specified channel group."
},
{
"Name": "channelinfo",
"Usages": [
"channelinfo cid={channelID}"
],
"Examples": [
{
"CommandLine": "channelinfo cid=1 channel_name=Default\\sChannel channel_topic=No\\s[b]topic[\\/b]\\shere channel_description=Welcome ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed configuration information about a channel including ID, topic, description, etc."
},
{
"Name": "channellist",
"Usages": [
"channellist [-topic] [-flags] [-voice] [-limits] [-icon] [-secondsempty]"
],
"Examples": [
{
"CommandLine": "channellist -topic cid=15 pid=0 channel_order=0 channel_name=Default\\sChannel channel_topic=No\\s[b]topic[\\/b] total_clients=2|cid=16 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of channels created on a virtual server including their ID, order, name, etc. The output can be modified using several command options."
},
{
"Name": "channelmove",
"Usages": [
"channelmove cid={channelID} cpid={channelParentID} [order={channelSortOrder}]"
],
"Examples": [
{
"CommandLine": "channelmove cid=16 cpid=1 order=0",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Moves a channel to a new parent channel with the ID cpid. If order is specified, the channel will be sorted right under the channel with the specified ID. If order is set to 0, the channel will be sorted right below the new parent."
},
{
"Name": "channelpermlist",
"Usages": [
"channelpermlist cid={channelID} [-permsid]"
],
"Examples": [
{
"CommandLine": "channelpermlist cid=2 cid=2 permid=4353 permvalue=1 permnegated=0 permskip=0|permid=17276...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions defined for a channel."
},
{
"Name": "clientaddperm",
"Usages": [
"clientaddperm cldbid={clientDBID} permid={permID} permvalue={permValue} permskip={1|0}|...",
"clientaddperm cldbid={clientDBID} permsid={permName} "
],
"Examples": [
{
"CommandLine": "clientaddperm cldbid=16 permsid=i_client_talk_power permvalue=5 permskip=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "permvalue={permValue} permskip={1|0}|...\nAdds a set of specified permissions to a client. Multiple permissions can be added by providing the three parameters of each permission. A permission can be specified by permid or permsid."
},
{
"Name": "clientdbdelete",
"Usages": [
"clientdbdelete cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "clientdbdelete cldbid=56",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes a clients properties from the database."
},
{
"Name": "clientdbedit",
"Usages": [
"clientdbedit cldbid={clientDBID} [client_properties...]"
],
"Examples": [
{
"CommandLine": "clientdbedit cldbid=56 client_description=Best\\sguy\\sever!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes a clients settings using given properties."
},
{
"Name": "clientdbfind",
"Usages": [
"clientdbfind pattern={clientName|clientUID} [-uid]"
],
"Examples": [
{
"CommandLine": "clientdbfind pattern=sven cldbid=56",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of client database IDs matching a given pattern. You can either search for a clients last known nickname or his unique identity by using the -uid option."
},
{
"Name": "clientdbinfo",
"Usages": [
"clientdbinfo cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "clientdbinfo cldbid=2 client_unique_identifier=5rRxyxEjd+Kk/MvPRfqZdSI0teA= client_nickname=dante696 client_database_id=2 client_created=1279002103 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed database information about a client including unique ID, creation date, etc."
},
{
"Name": "clientdblist",
"Usages": [
"clientdblist [start={offset}] [duration={limit}] [-count]"
],
"Examples": [
{
"CommandLine": "clientdblist cldbid=7 client_unique_identifier=DZhdQU58qyooEK4Fr8Ly738hEmc= client_nickname=MuhChy client_created=1259147468 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of client identities known by the server including their database ID, last nickname, etc."
},
{
"Name": "clientdelperm",
"Usages": [
"channeldelperm cldbid={clientDBID} permid={permID}|permsid={permName}..."
],
"Examples": [
{
"CommandLine": "clientdelperm cldbid=16 permsid=i_icon_id|permsid=b_icon_manage",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from a client. Multiple permissions can be removed at once. A permission can be specified by permid or permsid."
},
{
"Name": "clientedit",
"Usages": [
"clientedit clid={clientID} [client_properties...]"
],
"Examples": [
{
"CommandLine": "clientedit clid=10 client_description=Best\\sguy\\sever!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes a clients settings using given properties."
},
{
"Name": "clientfind",
"Usages": [
"clientfind pattern={clientName}"
],
"Examples": [
{
"CommandLine": "clientfind pattern=sven clid=7 client_nickname=Sven",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of clients matching a given name pattern."
},
{
"Name": "clientgetdbidfromuid",
"Usages": [
"clientgetdbidfromuid cluid={clientUID}"
],
"Examples": [
{
"CommandLine": "clientgetdbidfromuid cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cldbid=32",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the database ID matching the unique identifier specified by cluid."
},
{
"Name": "clientgetids",
"Usages": [
"clientgetids cluid={clientUID}"
],
"Examples": [
{
"CommandLine": "clientgetids cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= clid=1 name=Janko",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays all client IDs matching the unique identifier specified by cluid."
},
{
"Name": "clientgetnamefromdbid",
"Usages": [
"clientgetnamefromdbid cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "clientgetnamefromdbid cldbid=32 cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cldbid=32 name=Janko",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the unique identifier and nickname matching the database ID specified by cldbid."
},
{
"Name": "clientgetnamefromuid",
"Usages": [
"clientgetnamefromuid cluid={clientUID}"
],
"Examples": [
{
"CommandLine": "clientgetnamefromuid cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cluid=dyjxkshZP6bz0n3bnwFQ1CkwZOM= cldbid=32 name=Janko",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the database ID and nickname matching the unique identifier specified by cluid."
},
{
"Name": "clientgetuidfromclid",
"Usages": [
"clientgetuidfromclid clid={clientID}"
],
"Examples": [
{
"CommandLine": "clientgetuidfromclid clid=8 clid=8 cluid=yXM6PUfbCcPU+joxIFek1xOQwwQ= nickname=MuhChy1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the unique identifier matching the clientID specified by clid."
},
{
"Name": "clientinfo",
"Usages": [
"clientinfo clid={clientID}"
],
"Examples": [
{
"CommandLine": "clientinfo clid=6 client_unique_identifier=P5H2hrN6+gpQI4n\\/dXp3p17vtY0= client_nickname=Rabe client_version=3.0.0-alpha24\\s[Build:\\s8785]...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed configuration information about a client including unique ID, nickname, client version, etc."
},
{
"Name": "clientkick",
"Usages": [
"clientkick reasonid={4|5} [reasonmsg={text}] clid={clientID}..."
],
"Examples": [
{
"CommandLine": "clientkick reasonid=4 reasonmsg=Go\\saway! clid=5|clid=6",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on reasonid. The reasonmsg parameter specifies a text message sent to the kicked clients. This parameter is optional and may only have a maximum of 40 characters.\nAvailable reasonid values are:\n 4: Kick the client from his current channel into the default channel\n 5: Kick the client from the server"
},
{
"Name": "clientlist",
"Usages": [
"clientlist [-uid] [-away] [-voice] [-times] [-groups] [-info] [-country][-ip]"
],
"Examples": [
{
"CommandLine": "clientlist -away clid=5 cid=7 client_database_id=40 client_nickname=ScP client_type=0 client_away=1 client_away_message=not\\shere|clid=6...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of clients online on a virtual server including their ID, nickname, status flags, etc. The output can be modified using several command options. Please note that the output will only contain clients which are currently in channels you're able to subscribe to."
},
{
"Name": "clientmove",
"Usages": [
"clientmove cid={channelID} [cpw={channelPassword}] clid={clientID}..."
],
"Examples": [
{
"CommandLine": "clientmove cid=3 clid=5|clid=6",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Moves one or more clients specified with clid to the channel with ID cid. If the target channel has a password, it needs to be specified with cpw. If the channel has no password, the parameter can be omitted."
},
{
"Name": "clientpermlist",
"Usages": [
"clientpermlist cldbid={clientDBID} [-permsid]"
],
"Examples": [
{
"CommandLine": "clientpermlist cldbid=2 cldbid=2 permid=4353 permvalue=1 permnegated=0 permskip=0|permid=17276...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions defined for a client."
},
{
"Name": "clientpoke",
"Usages": [
"clientpoke msg={txt} clid={clientID}"
],
"Examples": [
{
"CommandLine": "clientpoke msg=Wake\\sup! clid=5",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sends a poke message to the client specified with clid."
},
{
"Name": "clientsetserverquerylogin",
"Usages": [
"clientsetserverquerylogin client_login_name={username}"
],
"Examples": [
{
"CommandLine": "clientsetserverquerylogin client_login_name=admin client_login_password=+r\\/TQqvR",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Updates your own ServerQuery login credentials using a specified username. The password will be auto-generated."
},
{
"Name": "clientupdate",
"Usages": [
"clientupdate [client_properties...]"
],
"Examples": [
{
"CommandLine": "clientupdate client_nickname=ScP\\s(query)",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Change your ServerQuery clients settings using given properties."
},
{
"Name": "complainadd",
"Usages": [
"complainadd tcldbid={targetClientDBID} message={text}"
],
"Examples": [
{
"CommandLine": "complainadd tcldbid=3 message=Bad\\sguy!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Submits a complaint about the client with database ID tcldbid to the server."
},
{
"Name": "complaindelall",
"Usages": [
"complaindelall tcldbid={targetClientDBID}"
],
"Examples": [
{
"CommandLine": "complaindelall tcldbid=3",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes all complaints about the client with database ID tcldbid from the server."
},
{
"Name": "complaindel",
"Usages": [
"complaindel tcldbid={targetClientDBID} fcldbid={fromClientDBID}"
],
"Examples": [
{
"CommandLine": "complaindel tcldbid=3 fcldbid=4",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes the complaint about the client with database ID tcldbid submitted by the client with database ID fcldbid from the server."
},
{
"Name": "complainlist",
"Usages": [
"complainlist [tcldbid={targetClientDBID}]"
],
"Examples": [
{
"CommandLine": "complainlist tcldbid=3 tcldbid=3 tname=Julian fcldbid=56 fname=Sven message=Bad\\sguy!...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of complaints on the selected virtual server. If tcldbid is specified, only complaints about the targeted client will be shown."
},
{
"Name": "custominfo",
"Usages": [
"custominfo cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "custominfo cldbid=3 cldbid=3 ident=forum_account value=ScP|ident=forum_id value=123",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of custom properties for the client specified with cldbid."
},
{
"Name": "customsearch",
"Usages": [
"customsearch ident={ident} pattern={pattern}"
],
"Examples": [
{
"CommandLine": "customsearch ident=forum_account pattern=%ScP% cldbid=2 ident=forum_account value=ScP",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Searches for custom client properties specified by ident and value. The value parameter can include regular characters and SQL wildcard characters (e.g. %)."
},
{
"Name": "ftcreatedir",
"Usages": [
"ftcreatedir cid={channelID} cpw={channelPassword} dirname={dirPath}"
],
"Examples": [
{
"CommandLine": "ftcreatedir cid=2 cpw= dirname=\\/My\\sDirectory",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates new directory in a channels file repository."
},
{
"Name": "ftdeletefile",
"Usages": [
"ftdeletefile cid={channelID} cpw={channelPassword} name={filePath}..."
],
"Examples": [
{
"CommandLine": "ftdeletefile cid=2 cpw= name=\\/Pic1.PNG|name=\\/Pic2.PNG",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes one or more files stored in a channels file repository."
},
{
"Name": "ftgetfileinfo",
"Usages": [
"ftgetfileinfo cid={channelID} cpw={channelPassword} name={filePath}..."
],
"Examples": [
{
"CommandLine": "ftgetfileinfo cid=2 cpw= name=\\/Pic1.PNG|cid=2 cpw= name=\\/Pic2.PNG cid=2 path=\\/ name=Stuff size=0 datetime=1259415210 type=0|name=Pic1.PNG size=563783 datetime=1259425462 type=1|name=Pic2.PNG...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed information about one or more specified files stored in a channels file repository."
},
{
"Name": "ftgetfilelist",
"Usages": [
"ftgetfilelist cid={channelID} cpw={channelPassword} path={filePath}"
],
"Examples": [
{
"CommandLine": "ftgetfilelist cid=2 cpw= path=\\/ cid=2 path=\\/ name=Stuff size=0 datetime=1259415210 type=0|name=Pic1.PNG size=563783 datetime=1259425462 type=1|name=Pic2.PNG...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of files and directories stored in the specified channels file repository."
},
{
"Name": "ftinitdownload",
"Usages": [
"ftinitdownload clientftfid={clientFileTransferID} name={filePath} cid={channelID} cpw={channelPassword} seekpos={seekPosition}"
],
"Examples": [
{
"CommandLine": "ftinitdownload clientftfid=1 name=\\/image.iso cid=5 cpw= seekpos=0 clientftfid=1 serverftfid=7 ftkey=NrOga\\/4d2GpYC5oKgxuclTO37X83ca\\/1 port=...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Initializes a file transfer download. clientftfid is an arbitrary ID to identify the file transfer on client-side. On success, the server generates a new ftkey which is required to start downloading the file through TeamSpeak 3's file transfer interface."
},
{
"Name": "ftinitupload",
"Usages": [
"ftinitupload clientftfid={clientFileTransferID} name={filePath} cid={channelID} cpw={channelPassword} size={fileSize} overwrite={1|0} "
],
"Examples": [
{
"CommandLine": "ftinitupload clientftfid=1 name=\\/image.iso cid=5 cpw= size=673460224 overwrite=1 resume=0 clientftfid=1 serverftfid=6 ftkey=itRNdsIOvcBiBg\\/Xj4Ge51ZSrsShHuid port=...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "resume={1|0}\nInitializes a file transfer upload. clientftfid is an arbitrary ID to identify the file transfer on client-side. On success, the server generates a new ftkey which is required to start uploading the file through TeamSpeak 3's file transfer interface."
},
{
"Name": "ftlist",
"Usages": [
"ftlist"
],
"Examples": [
{
"CommandLine": "ftlist clid=2 path=files\\/virtualserver_1\\/channel_5 name=image.iso size=673460224 sizedone=450756 clientftfid=2 serverftfid=6 sender=0 status=1 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of running file transfers on the selected virtual server. The output contains the path to which a file is uploaded to, the current transfer rate in bytes per second, etc."
},
{
"Name": "ftrenamefile",
"Usages": [
"ftrenamefile cid={channelID} cpw={channelPassword} [tcid={targetChannelID}] [tcpw={targetChannelPassword}] "
],
"Examples": [
{
"CommandLine": "ftrenamefile cid=2 cpw= tcid=3 tcpw= oldname=\\/Pic3.PNG newname=\\/Pic3.PNG",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "oldname={oldFilePath} newname={newFilePath}\nRenames a file in a channels file repository. If the two parameters tcid and tcpw are specified, the file will be moved into another channels file repository."
},
{
"Name": "ftstop",
"Usages": [
"ftstop serverftfid={serverFileTransferID} delete={1|0}"
],
"Examples": [
{
"CommandLine": "ftstop serverftfid=2 delete=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Stops the running file transfer with server-side ID serverftfid."
},
{
"Name": "gm",
"Usages": [
"gm msg={text}"
],
"Examples": [
{
"CommandLine": "gm msg=Hello\\sWorld!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sends a text message to all clients on all virtual servers in the TeamSpeak 3 Server instance."
},
{
"Name": "hostinfo",
"Usages": [
"hostinfo"
],
"Examples": [
{
"CommandLine": "hostinfo virtualservers_running_total=3 virtualservers_total_maxclients=384 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed configuration information about the server instance including uptime, number of virtual servers online, traffic information, etc."
},
{
"Name": "instanceedit",
"Usages": [
"instanceedit [instance_properties...]"
],
"Examples": [
{
"CommandLine": "instanceedit serverinstance_filetransfer_port=1337",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes the server instance configuration using given properties."
},
{
"Name": "instanceinfo",
"Usages": [
"instanceinfo"
],
"Examples": [
{
"CommandLine": "instanceinfo serverinstance_database_version=12 serverinstance_filetransfer_port=30033 serverinstance_template_guest_serverquery_group=1...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the server instance configuration including database revision number, the file transfer port, default group IDs, etc."
},
{
"Name": "logadd",
"Usages": [
"logadd loglevel={1-4} logmsg={text}"
],
"Examples": [
{
"CommandLine": "logadd loglevel=4 logmsg=Informational\\smessage!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Writes a custom entry into the servers log. Depending on your permissions, you'll be able to add entries into the server instance log and/or your virtual servers log. The loglevel parameter specifies the type of the entry."
},
{
"Name": "logview",
"Usages": [
"logview [lines={1-100}] [reverse={1|0}] [instance={1|0}] [begin_pos={n}]"
],
"Examples": [
{
"CommandLine": "logview last_pos=403788 file_size=411980 l=\\p\\slistening\\son\\s0.0.0.0:9987 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a specified number of entries from the servers logfile. If instance\nis set to 1, the server will return lines from the master logfile (ts3server_0)\ninstead of the selected virtual server logfile."
},
{
"Name": "messageadd",
"Usages": [
"messageadd cluid={clientUID} subject={subject} message={text}"
],
"Examples": [
{
"CommandLine": "messageadd cluid=oHhi9WzXLNEFQOwAu4JYKGU+C+c= subject=Hi! message=Hello?!?",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sends an offline message to the client specified by cluid."
},
{
"Name": "messagedel",
"Usages": [
"messagedel msgid={messageID}"
],
"Examples": [
{
"CommandLine": "messagedel msgid=4",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes an existing offline message with ID msgid from your inbox."
},
{
"Name": "messageget",
"Usages": [
"messageget msgid={messageID}"
],
"Examples": [
{
"CommandLine": "messageget msgid=4 msgid=4 cluid=xwEzb5ENOaglVHu9oelK++reUyE= subject=Hi! message=Hello?!?",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays an existing offline message with ID msgid from your inbox. Please note that this does not automatically set the flag_read property of the message."
},
{
"Name": "messagelist",
"Usages": [
"messagelist"
],
"Examples": [
{
"CommandLine": "messagelist msgid=4 cluid=xwEzb5ENOaglVHu9oelK++reUyE= subject=Test flag_read=0...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of offline messages you've received. The output contains the senders unique identifier, the messages subject, etc."
},
{
"Name": "messageupdateflag",
"Usages": [
"messageupdateflag msgid={messageID} flag={1|0}"
],
"Examples": [
{
"CommandLine": "messageupdateflag msgid=4 flag=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Updates the flag_read property of the offline message specified with msgid. If flag is set to 1, the message will be marked as read."
},
{
"Name": "permfind",
"Usages": [
"permfind permid={permID}"
],
"Examples": [
{
"CommandLine": "permfind permid=4353 t=0 id1=1 id2=0 p=4353|t=0 id1=2 id2=0 p=4353",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed information about all assignments of the permission specified with permid. The output is similar to permoverview which includes the type and the ID of the client, channel or group associated with the permission."
},
{
"Name": "permget",
"Usages": [
"permget permid={permID}",
"permget permsid={permName}"
],
"Examples": [
{
"CommandLine": "permget permid=21174 permsid=i_client_move_power permid=21174 permvalue=100",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "permget permsid=i_client_move_power permsid=i_client_move_power permid=21174 permvalue=100",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the current value of the permission specified with permid or permsid for your own connection. This can be useful when you need to check your own privileges."
},
{
"Name": "permidgetbyname",
"Usages": [
"permidgetbyname permsid={permName}|permsid={permName}|..."
],
"Examples": [
{
"CommandLine": "permidgetbyname permsid=b_serverinstance_help_view permsid=b_serverinstance_help_view permid=4353",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the database ID of one or more permissions specified by permsid."
},
{
"Name": "permissionlist",
"Usages": [
"permissionlist"
],
"Examples": [
{
"CommandLine": "permissionlist permid=21413 permname=b_client_channel_textmessage_send permdesc=Send\\ste...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions available on the server instance including ID, name and description."
},
{
"Name": "permoverview",
"Usages": [
"permoverview cid={channelID} cldbid={clientDBID} permid={permID}"
],
"Examples": [
{
"CommandLine": "permoverview cldbid=57 cid=74 permid=0 t=0 id1=5 id2=0 p=37 v=1 n=0 s=0|t=0 id1=5 id2=0 p=38 v=1 n=0 s=0|...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays all permissions assigned to a client for the channel specified with cid. If permid is set to 0, all permissions will be displayed. The output follows the following format:\n t={permType} id1={id1} id2={id2} p={permID} v={permValue} n={permNegated} s={permSkip}|t={permType} id1={id1} id2={id2} p={permID} v={permValue} n={permNegated} s={permSkip}|...\nThe possible values for t, id1 and id2 are:\n 0: Server Group; => id1={serverGroupID}, id2=0\n 1: Global Client; => id1={clientDBID}, id2=0\n 2: Channel; => id1={channelID}, id2=0\n 3: Channel Group; => id1={channelID}, id2={channelGroupID}\n 4: Channel Client; => id1={channelID}, id2={clientDBID}"
},
{
"Name": "permreset",
"Usages": [
"permreset"
],
"Examples": [
{
"CommandLine": "permreset token=MqQbPLLm6jLC+x8j31jUL7GkME1UY0GaDYK+XG5e",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Restores the default permission settings on the selected virtual server and creates a new initial administrator token. Please note that in case of an error during the permreset call - e.g. when the database has been modified or corrupted - the virtual server will be deleted from the database."
},
{
"Name": "privilegekeyadd",
"Usages": [
"privilegekeyadd tokentype={1|0} tokenid1={groupID} tokenid2={channelID} [tokendescription={description}] [tokencustomset={customFieldSet}]"
],
"Examples": [
{
"CommandLine": "privilegekeyadd tokentype=0 tokenid1=6 tokenid2=0 tokendescription=Test tokencustomset=ident=forum_user\\svalue=dante\\pident=forum_id\\svalue=123 token=1ayoQOxG8r5Re78zgChvLYBWWaFWCoty0Uh+pUFk",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Create a new token. If tokentype is set to 0, the ID specified with tokenid1 will be a server group ID. Otherwise, tokenid1 is used as a channel group ID and you need to provide a valid channel ID using tokenid2.\nThe tokencustomset parameter allows you to specify a set of custom client properties. This feature can be used when generating tokens to combine a website account database with a TeamSpeak user. The syntax of the value needs to be escaped using the ServerQuery escape patterns and has to follow the general syntax of:\nident=ident1 value=value1|ident=ident2 value=value2|ident=ident3 value=value3"
},
{
"Name": "privilegekeydelete",
"Usages": [
"privilegekeydelete token={tokenKey}"
],
"Examples": [
{
"CommandLine": "privilegekeydelete token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes an existing token matching the token key specified with token."
},
{
"Name": "privilegekeylist",
"Usages": [
"privilegekeylist"
],
"Examples": [
{
"CommandLine": "privilegekeylist token=88CVUg\\/zkujt+y+WfHdko79UcM4R6uyCL6nEfy3B token_type=0 token_id1=9...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of tokens available including their type and group IDs. Tokens can be used to gain access to specified server or channel groups.\nA token is similar to a client with administrator privileges that adds you to a certain permission group, but without the necessity of a such a client with administrator privileges to actually exist. It is a long (random looking) string that can be used as a ticket into a specific server group."
},
{
"Name": "privilegekeyuse",
"Usages": [
"privilegekeyuse token={tokenKey}"
],
"Examples": [
{
"CommandLine": "privilegekeyuse token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Use a token key gain access to a server or channel group. Please note that the server will automatically delete the token after it has been used."
},
{
"Name": "sendtextmessage",
"Usages": [
"sendtextmessage targetmode={1-3} target={serverID|channelID|clientID} msg={text}"
],
"Examples": [
{
"CommandLine": "sendtextmessage targetmode=2 target=1 msg=Hello\\sWorld!",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sends a text message a specified target. The type of the target is determined by targetmode while target specifies the ID of the recipient, whether it be a virtual server, a channel or a client."
},
{
"Name": "servercreate",
"Usages": [
"servercreate [virtualserver_properties...]"
],
"Examples": [
{
"CommandLine": "servercreate virtualserver_name=TeamSpeak\\s]\\p[\\sServer virtualserver_port=9988 virtualserver_maxclients=32 sid=7 token=HhPbcMAMdAHGUip1yOma2Tl3sN0DN7B3Y0JVzYv6 virtualserver_port=9988",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a new virtual server using the given properties and displays its ID and initial administrator token. If virtualserver_port is not specified, the server will test for the first unused UDP port."
},
{
"Name": "serverdelete",
"Usages": [
"serverdelete sid={serverID}"
],
"Examples": [
{
"CommandLine": "serverdelete sid=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes the virtual server specified with sid. Please note that only virtual servers in stopped state can be deleted."
},
{
"Name": "serveredit",
"Usages": [
"serveredit [virtualserver_properties...]"
],
"Examples": [
{
"CommandLine": "serveredit virtualserver_name=TeamSpeak\\sServer virtualserver_maxclients=32",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes the selected virtual servers configuration using given properties."
},
{
"Name": "servergroupaddclient",
"Usages": [
"servergroupaddclient sgid={groupID} cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "servergroupaddclient sgid=16 cldbid=3",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Adds a client to the server group specified with sgid. Please note that a client cannot be added to default groups or template groups."
},
{
"Name": "servergroupadd",
"Usages": [
"servergroupadd name={groupName} [type={groupDbType}]"
],
"Examples": [
{
"CommandLine": "servergroupadd name=Server\\sAdmin sgid=13",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a new server group using the name specified with name and displays its ID. The optional type parameter can be used to create ServerQuery groups and template groups."
},
{
"Name": "servergroupaddperm",
"Usages": [
"servergroupaddperm sgid={groupID} permid={permID} permvalue={permValue} permnegated={1|0} permskip={1|0}|..."
],
"Examples": [
{
"CommandLine": "servergroupaddperm sgid=13 permid=8470 permvalue=1 permnegated=0 permskip=0|permid=8475 permvalue=0 permnegated=1 permskip=0",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupaddperm sgid=13 permsid=i_icon_id permvalue=123 permnegated=0 permskip=0|permsid=b_virtualserver_stop permvalue=0 permnegated=1 permskip=0",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "servergroupaddperm sgid={groupID} permsid={permName}\n\t permvalue={permValue} permnegated={1|0} permskip={1|0}|...\nAdds a set of specified permissions to the server group specified with sgid. Multiple permissions can be added by providing the four parameters of each permission. A permission can be specified by permid or permsid."
},
{
"Name": "servergroupautoaddperm",
"Usages": [
"servergroupautoaddperm sgtype={type} permid={permID} permvalue={permValue} permnegated={1|0} permskip={1|0}|..."
],
"Examples": [
{
"CommandLine": "servergroupautoaddperm sgtype=45 permid=8470 permvalue=1 permnegated=0 permskip=0|permid=8475 permvalue=0 permnegated=1 permskip=0",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupautoaddperm sgtype=45 permsid=i_icon_id permvalue=123 permnegated=0 permskip=0|permsid=b_virtualserver_stop permvalue=0 permnegated=1 permskip=0",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "servergroupautoaddperm sgtype={type} permsid={permName}\n\t permvalue={permValue} permnegated={1|0} permskip={1|0}|...\nAdds a set of specified permissions to ALL regular server groups on all virtual servers. The target groups will be identified by the value of their\ni_group_auto_update_type permission specified with sgtype. Multiple permissions can be added at once. A permission can be specified by permid or permsid.\nThe known values for sgtype are:\n 10: Channel Guest\n 15: Server Guest\n 20: Query Guest\n 25: Channel Voice\n 30: Server Normal\n 35: Channel Operator\n 40: Channel Admin\n 45: Server Admin\n 50: Query Admin"
},
{
"Name": "servergroupclientlist",
"Usages": [
"servergroupclientlist sgid={groupID} [-names]"
],
"Examples": [
{
"CommandLine": "servergroupclientlist sgid=16 cldbid=7|cldbid=8|cldbid=9|cldbid=11|cldbid=13|cldbid=16|cldbid=18|...",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupclientlist sgid=8 -names cldbid=4 client_nickname=ScP client_unique_identifier=FPMPSC6MXqXq7...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the IDs of all clients currently residing in the server group specified with sgid. If you're using the -names option, the output will also contain the last known nickname and the unique identifier of the clients."
},
{
"Name": "servergroupcopy",
"Usages": [
"servergroupcopy ssgid={sourceGroupID} tsgid={targetGroupID} name={groupName} type={groupDbType}"
],
"Examples": [
{
"CommandLine": "servergroupcopy ssgid=6 tsgid=0 name=My\\sGroup\\s(Copy) type=1 sgid=21",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Creates a copy of the server group specified with ssgid. If tsgid is set to 0, the server will create a new group. To overwrite an existing group, simply set tsgid to the ID of a designated target group. If a target group is set, the name parameter will be ignored.\nThe type parameter can be used to create ServerQuery and template groups."
},
{
"Name": "servergroupdelclient",
"Usages": [
"servergroupdelclient sgid={groupID} cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "servergroupdelclient sgid=16 cldbid=3",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a client from the server group specified with sgid."
},
{
"Name": "servergroupdel",
"Usages": [
"servergroupdel sgid={groupID} force={1|0}"
],
"Examples": [
{
"CommandLine": "servergroupdel sgid=13",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupdel sgid=14 force=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes the server group specified with sgid. If force is set to 1, the server group will be deleted even if there are clients within."
},
{
"Name": "servergroupdelperm",
"Usages": [
"servergroupdelperm sgid={groupID} permid={permID}|permid={permID}",
"servergroupdelperm sgid={groupID} permsid={permName}"
],
"Examples": [
{
"CommandLine": "servergroupdelperm sgid=16 permid=8470|permid=8475",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupdelperm sgid=16 permsid=i_channel_join_power",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from the server group specified with sgid. Multiple permissions can be removed at once. A permission can be specified by permid or permsid."
},
{
"Name": "servergroupautodelperm",
"Usages": [
"servergroupautodelperm sgtype={type} permid={permID}|permid={permID}|...",
"servergroupautodelperm sgtype={type} permsid={permName}|..."
],
"Examples": [
{
"CommandLine": "servergroupautodelperm sgtype=45 permid=8470|permid=8475",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergroupautodelperm sgtype=45 permsid=b_virtualserver_modify_maxclients",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Removes a set of specified permissions from ALL regular server groups on all virtual servers. The target groups will be identified by the value of their\ni_group_auto_update_type permission specified with sgtype. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.\nThe known values for sgtype are:\n 10: Channel Guest\n 15: Server Guest\n 20: Query Guest\n 25: Channel Voice\n 30: Server Normal\n 35: Channel Operator\n 40: Channel Admin\n 45: Server Admin\n 50: Query Admin"
},
{
"Name": "servergrouplist",
"Usages": [
"servergrouplist"
],
"Examples": [
{
"CommandLine": "servergrouplist sgid=9 name=Server\\sAdmin type=1 iconid=300 savedb=1|sgid=10 name=Normal t...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of server groups available. Depending on your permissions, the output may also contain global ServerQuery groups and template groups."
},
{
"Name": "servergrouppermlist",
"Usages": [
"servergrouppermlist sgid={groupID} [-permsid]"
],
"Examples": [
{
"CommandLine": "servergrouppermlist sgid=13 permid=8470 permvalue=1 permnegated=0 permskip=0|permid=8475 permvalue=1|...",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servergrouppermlist sgid=14 -permsid permsid=b_virtualserver_info_view permvalue=1 permnegated=0 permskip=0|...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of permissions assigned to the server group specified with sgid.\nThe optional -permsid parameter can be used to get the permission names instead\nof their internal ID."
},
{
"Name": "servergrouprename",
"Usages": [
"servergrouprename sgid={groupID} name={groupName}"
],
"Examples": [
{
"CommandLine": "servergrouprename sgid=13 name=New\\sName",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Changes the name of the server group specified with sgid."
},
{
"Name": "servergroupsbyclientid",
"Usages": [
"servergroupsbyclientid cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "servergroupsbyclientid cldbid=18 name=Server\\sAdmin sgid=6 cldbid=18",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays all server groups the client specified with cldbid is currently residing in."
},
{
"Name": "serveridgetbyport",
"Usages": [
"serveridgetbyport virtualserver_port={serverPort}"
],
"Examples": [
{
"CommandLine": "serveridgetbyport virtualserver_port=9987 server_id=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the database ID of the virtual server running on the UDP port specified by virtualserver_port."
},
{
"Name": "serverinfo",
"Usages": [
"serverinfo"
],
"Examples": [
{
"CommandLine": "serverinfo virtualserver_port=9987 virtualserver_name=TeamSpeak\\s]I[\\sServer virtua...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed configuration information about the selected virtual server including unique ID, number of clients online, configuration, etc."
},
{
"Name": "serverlist",
"Usages": [
"serverlist [-uid] [-all] [-short] [-onlyoffline]"
],
"Examples": [
{
"CommandLine": "serverlist virtualserver_id=1 virtualserver_port=9987 virtualserver_status=online virtualserver_clientsonline=6...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of virtual servers including their ID, status, number of clients online, etc. If you're using the -all option, the server will list all virtual servers stored in the database. This can be useful when multiple server instances with different machine IDs are using the same database. The machine ID is used to identify the server instance a virtual server is associated with.\nThe status of a virtual server can be either online, offline, booting up, shutting down and virtual online. While most of them are self-explanatory, virtual online is a bit more complicated. Whenever you select a virtual server which is currently stopped, it will be started in virtual mode which means you are able to change its configuration, create channels or change permissions,\nbut no regular TeamSpeak 3 Client can connect. As soon as the last ServerQuery\nclient deselects the virtual server, its status will be changed back to offline."
},
{
"Name": "servernotifyregister",
"Usages": [
"servernotifyregister [id={channelID}] event={server|channel|textserver|textchannel|textprivate}"
],
"Examples": [
{
"CommandLine": "servernotifyregister event=server",
"ReturnValue": "error id=0 msg=ok"
},
{
"CommandLine": "servernotifyregister event=channel id=123",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Registers for a specified category of events on a virtual server to receive notification messages. Depending on the notifications you've registered for, the server will send you a message on every event in the view of your ServerQuery client (e.g. clients joining your channel, incoming text messages, server configuration changes, etc). The event source is declared by the event parameter while id can be used to limit the notifications to a specific channel."
},
{
"Name": "servernotifyunregister",
"Usages": [
"servernotifyunregister"
],
"Examples": [
{
"CommandLine": "servernotifyunregister",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Unregisters all events previously registered with servernotifyregister so you will no longer receive notification messages."
},
{
"Name": "serverprocessstop",
"Usages": [
"serverprocessstop"
],
"Examples": [
{
"CommandLine": "serverprocessstop",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Stops the entire TeamSpeak 3 Server instance by shutting down the process."
},
{
"Name": "serverrequestconnectioninfo",
"Usages": [
"serverrequestconnectioninfo"
],
"Examples": [
{
"CommandLine": "serverrequestconnectioninfo connection_filetransfer_bandwidth_sent=0 connection_packets_sent_total=0...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays detailed connection information about the selected virtual server including uptime, traffic information, etc."
},
{
"Name": "serversnapshotcreate",
"Usages": [
"serversnapshotcreate"
],
"Examples": [
{
"CommandLine": "serversnapshotcreate hash=bnTd2E1kNITHjJYRCFjgbKKO5P8=|virtualserver_name=TeamSpeak\\sServer...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a snapshot of the selected virtual server containing all settings, groups and known client identities. The data from a server snapshot can be used to restore a virtual servers configuration."
},
{
"Name": "serversnapshotdeploy",
"Usages": [
"serversnapshotdeploy {virtualserver_snapshot}"
],
"Examples": [
{
"CommandLine": "serversnapshotdeploy hash=bnTd2E1kNITHjJYRCFjgbKKO5P8=|virtualserver_...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Restores the selected virtual servers configuration using the data from a previously created server snapshot. Please note that the TeamSpeak 3 Server does NOT check for necessary permissions while deploying a snapshot so the command could be abused to gain additional privileges."
},
{
"Name": "serverstart",
"Usages": [
"serverstart sid={serverID}"
],
"Examples": [
{
"CommandLine": "serverstart sid=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Starts the virtual server specified with sid. Depending on your permissions, you're able to start either your own virtual server only or any virtual server in the server instance."
},
{
"Name": "servertemppasswordadd",
"Usages": [
"servertemppasswordadd pw={password} desc={description} duration={seconds} tcid={channelID} tcpw={channelPW}"
],
"Examples": [
{
"CommandLine": "servertemppasswordadd pw=secret desc=none duration=3600 tcid=117535 tcpw=123",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sets a new temporary server password specified with pw. The temporary password will be valid for the number of seconds specified with duration. The client\nconnecting with this password will automatically join the channel specified with tcid. If tcid is set to 0, the client will join the default channel."
},
{
"Name": "servertemppassworddel",
"Usages": [
"servertemppassworddel pw={password}"
],
"Examples": [
{
"CommandLine": "servertemppassworddel pw=secret",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes the temporary server password specified with pw."
},
{
"Name": "servertemppasswordlist",
"Usages": [
"servertemppasswordlist"
],
"Examples": [
{
"CommandLine": "servertemppasswordlist nickname=serveradmin uid=serveradmin desc=none pw_clear=secret start=1331496494 end=1331500094 tcid=117535|nickname=serveradmin...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Returns a list of active temporary server passwords. The output contains the clear-text password, the nickname and unique identifier of the creating client."
},
{
"Name": "serverstop",
"Usages": [
"serverstop sid={serverID}"
],
"Examples": [
{
"CommandLine": "serverstop sid=1",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Stops the virtual server specified with sid. Depending on your permissions, you're able to stop either your own virtual server only or all virtual servers in the server instance."
},
{
"Name": "setclientchannelgroup",
"Usages": [
"setclientchannelgroup cgid={groupID} cid={channelID} cldbid={clientDBID}"
],
"Examples": [
{
"CommandLine": "setclientchannelgroup cgid=13 cid=15 cldbid=20",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Sets the channel group of a client to the ID specified with cgid."
},
{
"Name": "tokenadd",
"Usages": [
"tokenadd tokentype={1|0} tokenid1={groupID} tokenid2={channelID} [tokendescription={description}] [tokencustomset={customFieldSet}]"
],
"Examples": [
{
"CommandLine": "tokenadd tokentype=0 tokenid1=6 tokenid2=0 tokendescription=Test tokencustomset=ident=forum_user\\svalue=ScP\\pident=forum_id\\svalue=123 token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Create a new token. If tokentype is set to 0, the ID specified with tokenid1 will be a server group ID. Otherwise, tokenid1 is used as a channel group ID and you need to provide a valid channel ID using tokenid2.\nThe tokencustomset parameter allows you to specify a set of custom client properties. This feature can be used when generating tokens to combine a website account database with a TeamSpeak user. The syntax of the value needs to be escaped using the ServerQuery escape patterns and has to follow the general syntax of:\nident=ident1 value=value1|ident=ident2 value=value2|ident=ident3 value=value3"
},
{
"Name": "tokendelete",
"Usages": [
"tokendelete token={tokenKey}"
],
"Examples": [
{
"CommandLine": "tokendelete token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Deletes an existing token matching the token key specified with token."
},
{
"Name": "tokenlist",
"Usages": [
"tokenlist"
],
"Examples": [
{
"CommandLine": "tokenlist token=88CVUg\\/zkujt+y+WfHdko79UcM4R6uyCL6nEfy3B token_type=0 token_id1=9...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays a list of tokens available including their type and group IDs. Tokens can be used to gain access to specified server or channel groups.\nA token is similar to a client with administrator privileges that adds you to a certain permission group, but without the necessity of a such a client with administrator privileges to actually exist. It is a long (random looking) string that can be used as a ticket into a specific server group."
},
{
"Name": "tokenuse",
"Usages": [
"tokenuse token={tokenKey}"
],
"Examples": [
{
"CommandLine": "tokenuse token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Use a token key gain access to a server or channel group. Please note that the server will automatically delete the token after it has been used."
},
{
"Name": "version",
"Usages": [
"version"
],
"Examples": [
{
"CommandLine": "version version=3.0.0-beta16 build=9929 platform=Linux",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays the servers version information including platform and build number."
},
{
"Name": "whoami",
"Usages": [
"whoami"
],
"Examples": [
{
"CommandLine": "whoami virtualserver_status=online virtualserver_id=1 client_channel_id=2 ...",
"ReturnValue": "error id=0 msg=ok"
}
],
"Description": "Displays information about your current ServerQuery connection including the ID of the selected virtual server, your loginname, etc."
}
]
command_name
Usage: <usage of parameters, multiline until the line starts without whitespace>
<alternate command or continuation of previous command line>
<multiline
description
until "Example:">
Example:
<example command usage>
<same multi-lining rules as "Usage">
---------------------------------------------------------
<next command>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace Format_TS3
{
class Program
{
const string Seperator = "---------------------------------------------------------";
// Important: Reference Newtonsoft's Json.Net!
static void Main(string[] args)
{
// provide file generated by PowerShell script
const string fileName = @"ts3_query_api.txt";
var str = System.IO.File.OpenRead(fileName);
var reader = new StreamReader(str);
var cmds = GetCommands(reader);
var json = JsonConvert.SerializeObject(cmds, Formatting.Indented);
Console.WriteLine(json); // STDOUT later grabbed via piping
}
static List<Command> GetCommands(StreamReader reader)
{
var cmds = new List<Command>();
for (var cmd = GetCommand(reader); cmd != null; cmd = GetCommand(reader))
{
if(cmd != Invalid)
cmds.Add(cmd);
}
return cmds;
}
// "help servergroupbyclientid" returns help for "servergroupsbyclientid"
// See report at
// http://forum.teamspeak.com/showthread.php/98292-Query-API-servergroupbyclientid-returns-help-for-servergroupsbyclientid?p=379624
static readonly string[] wutCommands =
{
"servergroupbyclientid"
};
private static readonly Command Invalid = new Command();
static Command GetCommand(StreamReader reader)
{
// command name
var commandName = reader.ReadLine();
if (commandName == null)
return null;
var cmd = new Command();
cmd.Name = commandName;
if (wutCommands.Contains(cmd.Name))
{
var line = reader.ReadLine(); // Skip to next command
while (line != null && line != Seperator)
line = reader.ReadLine();
return Invalid;
}
reader.ReadLine(); // Empty line
// usage
var nextLine = reader.ReadLine();
var usage = new StringBuilder(nextLine);
if (nextLine.StartsWith("Usage: "))
usage = usage.Remove(0, "Usage: ".Length);
var usages = new List<string>();
nextLine = reader.ReadLine();
while (nextLine.StartsWith(" "))
{
nextLine = nextLine.TrimStart();
if (nextLine.StartsWith(cmd.Name))
{
usages.Add(usage.ToString());
usage = new StringBuilder(nextLine);
}
else
{
usage.Append(nextLine);
}
nextLine = reader.ReadLine();
}
usages.Add(usage.ToString().TrimStart());
cmd.Usages = usages;
// description
string commandDescription = "";
while (!nextLine.StartsWith("Example:") && !nextLine.StartsWith("Examples:"))
{
if(commandDescription != "" && commandDescription.EndsWith(" "))
commandDescription += nextLine;
else
commandDescription += "\n" + nextLine;
nextLine = reader.ReadLine();
}
cmd.Description = commandDescription.Trim();
// examples
cmd.Examples = new List<Example>();
Example currentSample = null;
bool isInCommand = true;
var currentLine = reader.ReadLine().TrimStart();
while (currentLine != Seperator)
{
if (((currentLine.StartsWith(cmd.Name)) || currentSample == null)
&& !(currentSample != null && currentSample.ReturnValue == null))
{
if (currentSample != null)
cmd.Examples.Add(currentSample);
isInCommand = true;
currentSample = new Example();
currentSample.CommandLine = currentLine.Trim();
}
else
{
if (currentLine.StartsWith("error id="))
{
if (isInCommand)
isInCommand = false;
}
if (isInCommand)
currentSample.CommandLine += " " + currentLine;
else
currentSample.ReturnValue += " " + currentLine;
}
currentLine = reader.ReadLine().TrimStart();
}
cmd.Examples.Add(currentSample);
foreach (var s in cmd.Examples)
s.ReturnValue = s.ReturnValue.TrimStart();
return cmd;
}
}
public class Command
{
public string Name { get; set; }
public List<string> Usages { get; set; }
public List<Example> Examples { get; set; }
public string Description { get; set; }
}
public class Example
{
public string CommandLine { get; set; }
public string ReturnValue { get; set; }
}
}
$tcp = new-object System.Net.Sockets.TcpClient
$server = "host name/ip address"
$port = port # default: 10011
$user = "user"
$password = "password"
$destFile = "path_to_some\ts3_query_api.txt"
# TODO:
# use commands obtained from "help" command
$commands = @("login", "logout", "quit", "use", "banadd", "banclient", "bandelall", "bandel", "banlist", "bindinglist", "channeladdperm", "channelclientaddperm", "channelclientdelperm", "channelclientpermlist", "channelcreate", "channeldelete", "channeldelperm", "channeledit", "channelfind", "channelgroupadd", "channelgroupaddperm", "channelgroupclientlist", "channelgroupcopy", "channelgroupdel", "channelgroupdelperm", "channelgrouplist", "channelgrouppermlist", "channelgrouprename", "channelinfo", "channellist", "channelmove", "channelpermlist", "clientaddperm", "clientdbdelete", "clientdbedit", "clientdbfind", "clientdbinfo", "clientdblist", "clientdelperm", "clientedit", "clientfind", "clientgetdbidfromuid", "clientgetids", "clientgetnamefromdbid", "clientgetnamefromuid", "clientgetuidfromclid", "clientinfo", "clientkick", "clientlist", "clientmove", "clientpermlist", "clientpoke", "clientsetserverquerylogin", "clientupdate", "complainadd", "complaindelall", "complaindel", "complainlist", "custominfo", "customsearch", "ftcreatedir", "ftdeletefile", "ftgetfileinfo", "ftgetfilelist", "ftinitdownload", "ftinitupload", "ftlist", "ftrenamefile", "ftstop", "gm", "hostinfo", "instanceedit", "instanceinfo", "logadd", "logview", "messageadd", "messagedel", "messageget", "messagelist", "messageupdateflag", "permfind", "permget", "permidgetbyname", "permissionlist", "permoverview", "permreset", "privilegekeyadd", "privilegekeydelete", "privilegekeylist", "privilegekeyuse", "sendtextmessage", "servercreate", "serverdelete", "serveredit", "servergroupaddclient", "servergroupadd", "servergroupaddperm", "servergroupautoaddperm", "servergroupbyclientid", "servergroupclientlist", "servergroupcopy", "servergroupdelclient", "servergroupdel", "servergroupdelperm", "servergroupautodelperm", "servergrouplist", "servergrouppermlist", "servergrouprename", "servergroupsbyclientid", "serveridgetbyport", "serverinfo", "serverlist", "servernotifyregister", "servernotifyunregister", "serverprocessstop", "serverrequestconnectioninfo", "serversnapshotcreate", "serversnapshotdeploy", "serverstart", "servertemppasswordadd", "servertemppassworddel", "servertemppasswordlist", "serverstop", "setclientchannelgroup", "tokenadd", "tokendelete", "tokenlist", "tokenuse", "version", "whoami")
$seperator = "---------------------------------------------------------"
# actual script
$tcp.Connect($server, $port)
$ns = $tcp.GetStream();
$reader = new-object System.IO.StreamReader -ArgumentList $ns
$writer = New-Object System.IO.StreamWriter -ArgumentList $ns
$writer.NewLine = "`n"
Write-Host "Welcome Message 1: " $reader.ReadLine()
Write-Host "Welcome Message 2: " $reader.ReadLine()
Write-Host "Welcome Message 3: " $reader.ReadLine()
$line = ""
$writer.WriteLine("login $user $password")
$writer.Flush()
Write-Host $reader.ReadLine()
Write-Host $reader.ReadLine()
foreach($cmd in $commands)
{
$writer.WriteLine("help $cmd")
if(-not $tcp.Connected)
{
Write-Host "Connection closed."
break
}
$writer.Flush()
Write-Host "Getting command: $cmd"
$line = $reader.ReadLine()
while($line -ne "error id=0 msg=ok")
{
if(-not [System.String]::IsNullOrWhiteSpace($line))
{
$lines += "`n" + $line
}
$line = $reader.ReadLine()
}
$lines += "`n" + $seperator
[System.IO.File]::AppendAllText($destFile, "`n" + $cmd + "`n" + $lines)
$lines = ""
# If not white listed, you should remove the comment symbol. This takes a significant amount of time longer to dump, but should'nt ban you.
# [System.Threading.Thread]::Sleep(5000)
}
Write-Host "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment